Vely logo install | documentation | examples | changelog
16.10.0 released May 10, 2023
Vely official web page


- What is Vely?
Vely is a C web framework, and a general purpose framework for C programming language.

- Latest: May 18, 2023
- The power of C
C is the fastest and most energy-efficient programming language. Buffer overwrites, memory management and low-level coding may have been reasons you'd choose another language in the past. Vely changes that by turning C into a rapid software development platform that's safer and easier. You can develop cloud applications, middleware, database applications or anything else and benefit from C's high performance at the same time. There is no need to compromise between the two. Moore's Law is slowing down and it's time to transition away from the bloated programming languages and frameworks, and towards efficiency and high performance. From the MIT Technology review: "Thompson and his colleagues showed that they could get a computationally intensive calculation to run some 47 times faster just by switching from ... a popular general-purpose programming language, to the more efficient C". More on why C and why Vely.
- Free Open Source framework
Vely is a general-purpose framework for building high-performance and lightweight software applications, based on C programming language. It is especially well suited for web applications. It's Free Open Source (under the Eclipse Public License 2 (EPL-2)), created by Sergio Mijatovic.
- Start now
You don't need to be a C expert. Install in minutes, then try 123_hello_world and examples for everything from a database example and a file manager to a multitenant SaaS application.
- Application server
Run a FastCGI application server that is accessible from Apache, Nginx or any other web server in minutes, for enhanced performance, safety and stability.
- Database support
Database support is included (MariaDB, PostgreSQL, SQLite).
- Support for just about anything
Vely statements are precompiled into C code, and cover web, database, strings, files, flow and execution, encoding/encryption, REST, JSON, time, error handling, daemon-izing code and other common tasks (see documentation). They are safer than C (no need to allocate memory or free it, avoiding major pitfalls) and very easy - generally one-liners, largely self-explanatory and more powerful than traditional API. Vely code is a breeze to read - it's just as important as the ease of writing it. Same code works for both web applications and command_line programs. Easily containerize_applications.
- Native and simple
Vely applications are 100% native high-performance and low-footprint without interpreters or byte-code schemes. Vely is not object-oriented, it's declarative and functional. Decades of adding more energy-intensive and ever-complex abstractions on top of programming languages led to programming code that's bad for the environment. It's time to help the Earth while making programming easier and applications faster!
- Standards-based
A Vely application works by processing standard HTTP requests, which simplifies the program interface across the board. Each request_URL by default states the application name and a request name which is the source file handling it. So, "/appname/mycode" means that application name is "appname" and that "mycode()" function defined in file mycode.vely will execute. Read more about vely_architecture and how_vely_works.
- Quality and continuous testing
Each Vely release must pass rigorous tests on every platform where it's available before it's released. There are currently 1543 such tests, see quality_control. See release_notes for what's new in each release.
- Report bugs, request features, contact
Contact at vely@vely.dev - send questions, bugs or suggest new features.
- Source code
Official source code git repo is here (click on Source to clone), and mirrors are on github and gitlab.
Examples

Click on each example for instructions. For a condensed Hello World that you can run from command line in just minutes, try 123_hello_world.
Documentation

Reference
Note: All the topics below are available as a single-page documentation. You can also download it as a .tar.gz file and use it on your computer, host it on your web site etc.


Application information ( get-app   set-app  )

Base64 ( decode-base64   encode-base64  )

Cookies ( delete-cookie   get-cookie   set-cookie  )

Database ( begin-transaction   commit-transaction   current-row   database_config_file   database_queries   delete-query   on-error   prepared_statements   query-result   rollback-transaction   run-query  )

Debugging ( debugging   trace-run  )

Documentation ( documentation  )

Encryption ( decrypt-data   derive-key   encrypt-data   hash-string   random-crypto   random-string  )

Error handling ( error_code   error_handling   on-error   report-error  )

Examples ( example_cookies   example_create_table   example_docker   example_file_manager   example_form   example_hash   example_hello_world   example_json   example_multitenant_SaaS   examples   example_sendmail   example_shopping   example_stock   example_utility   example_write_report  )

FIFO ( new-fifo   purge-fifo   read-fifo   rewind-fifo   write-fifo  )

Files ( close-file   copy-file   delete-file   file-position   file_storage   file_uploading   lock-file   open-file   read-file   read-line   rename-file   stat-file   temporary_file   uniq-file   unlock-file   write-file  )

General ( deploying_application   how_vely_works   quality_control   rename_files   SELinux   vely   vely_architecture   vely_removal   vf   vv   why_C_and_Vely  )

Hash table ( get-hash   new-hash   purge-hash   read-hash   resize-hash   write-hash  )

Hex encoding ( decode-hex   encode-hex  )

JSON ( delete-json   new-json   read-json  )

Language ( dot   inline_code   statement_APIs   syntax_highlighting   unused-var  )

License ( license  )

Memory ( delete-mem   manage-memory   memory_handling   new-mem   resize-mem  )

Output ( finish-output   flush-output   output_statement   p-dbl   pf-out   pf-url   pf-web   p-num   p-out   p-path   p-url   p-web  )

Process ( global_process_data  )

Program execution ( exec-program   exit-code  )

Program flow ( exit-request  )

Quick start ( 123_hello_world  )

Regex ( match-regex  )

Request information ( get-req   input-param   request-body   set-input   set-req  )

Requests ( after_request_handler   before_request_handler   building_URL   getting_URL   global_request_data   non_request   normalized_URL   request   request_URL   startup_handler   vely_dispatch_request  )

Running application ( application_setup   CGI   Client_API   command_line   containerize_application   FastCGI   FastCGI_client   plain_C_FCGI  )

Strings ( copy-string   count-substring   lower-string   split-string   trim-string   upper-string   write-string  )

System information ( get-sys  )

Time ( get-time  )

URL encoding ( decode-url   encode-url  )

UTF8 ( json-utf8   utf8-json  )

Web ( call-web   out-header   send-file   silent-header  )

Web encoding ( decode-web   encode-web  )

Web servers ( connect_apache_tcp_socket   connect_apache_unix_socket   connect_nginx_tcp_socket   connect_nginx_unix_socket  )

Man pages
Vely documentation is available online, and also as man pages (i.e. manual pages). You can take any of the topics above and type it in man, for example
man run-query

man how_vely_works

man example_shopping

The Vely section is '2vv', so in case of other software having conflicting topic names, you can also type
man 2vv run-query

man 2vv how_vely_works

man 2vv example_shopping

Download and install Vely


Vely is Free Open Source software, see license. It is available on Linux for amd64 (x86_64) or aarch64 architecture, and you can also build from source. For archived release source code, go to release history and see release notes.

Choose your distribution below. If your distro is not on the list, choose a similar one; for instance, for Rocky choose Redhat; for Deepin or Mint, choose Ubuntu; for Manjaro choose Arch; and so forth. For Raspberry PI (64 bit), use aarch64 bit packages, or for 32 bit you can compile from source.

amd64 (x86_64)arm64 (aarch64)


Release notes

  • 2023-05-10
    Vely release notes for 16.10.0
    - Release: Vely available on Fedora 38.    
    - Release: added -a option to vv for viewing changelog for the current release.
    - Release: fixed bug in deleting key in hash list due to memory leak.
    - Minor: added old-key clause in read-hash statement.
    - Release: added hash server example.
    - Release: added 11 new tests.

  • 2023-05-01
    Vely release notes for 16.9.4
    - Release: fixed bug: path info would not work with query string in FastCGI Client C API; updated tests and added example to documentation.
    - Release: vim highlighting update for Vely syntax.

  • 2023-04-27
    Vely release notes for 16.9.0
    - Minor: added unmanaged memory, i.e. memory that can be used for the life of the process across many requests, and also with any external C API libraries.
    - Release: fixed duplicate memory leak in vf process manager.
    - Release: improved performance of Vely preprocessing by 15%.
    - Release: fixed bug with command-line program exit code.
    - Release: fixed bug where FCGI attempts to access bad memory in request on accept.
    - Minor: added delete clause to purge-hash.
    - Release: fixed memory leak with new-json.
    - Minor: added delete clause to purge-fifo.
    - Release: fixed memory violation bug with purge-fifo.
    - Release: fixed memory violation bug with purge-hash.
    - Release: fixed memory leak with purge-fifo.
    - Release: fixed memory leak with delete-json.
    - Minor: added process-data clause to get-app.
    - Minor: added set-app statement with process-data clause. Added support for global process memory.
    - Minor: added manage-memory statement to switch between managed and unmanaged memory.
    - Release: added cleanup of db connections at the end.
    - Release: properly close trace when program done; delete all memory when done in command line and fcgi.
    - Release: fixed bug with finished-output where command line program would exit.
    - Release: fixed memory leak with derive-key and encrypt/decrypt.
    - Release: improved memory management performance: removed low-performance memory check.
    - Minor: added skip-data clause to delete-query statement.

  • 2023-04-14
    Vely release notes for 16.8.0
    - Minor: added 'name' clause to run-query to be used with any statements that operate on a query afterwards.
    - Minor: added delete-query statement to release all memory associated with the query, including the query results.
    - Release: simplified checking for issues in freeing memory, with a significant performance improvement.

For more release notes, click here.


Copyright (c) 2017-2023 Dasoftver LLC