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
- Back by popular demand: Ubuntu 18 build for both x86_64 and aarch64 is again available - it seems this particular distro is still widely used (in general, only the last two major releases are available).
- A new exciting feature is coming: multithreaded server calls. This will make it easy to make parallel (multithreaded) calls to any number of FastCGI servers (such as Vely or PHP). The advantage is performance, ability to utilize local or remote resources in parallel, and all without having to worry about MT-safety.
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
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
- Support for just about anything
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_application
- 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!
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
- 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 firstname.lastname@example.org
- 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
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
command line; web browser; Nginx; Unix sockets; 2 source files, 7 lines of code.
web browser; Apache; Unix sockets; 1 source files, 49 lines of code.
PostgreSQL; command line; web browser; Nginx; Unix sockets; 2 source files, 44 lines of code.
PostgreSQL; web browser; Apache; TCP sockets; 6 source files, 169 lines of code.
PostgreSQL; web browser; Apache; Unix sockets; 4 source files, 86 lines of code.
web browser; Apache; REST API; Unix sockets; 3 source files, 59 lines of code.
web browser; Nginx; Unix sockets; 5 source files, 160 lines of code.
MariaDB; web browser; Apache; Application path; Unix sockets; 7 source files, 312 lines of code.
web browser; Apache; Unix sockets; 1 source files, 79 lines of code.
PostgreSQL; web browser; Apache; REST API; Application path; Unix sockets; 11 source files, 212 lines of code.
MariaDB; command line; web browser; Nginx; Unix sockets; 3 source files, 55 lines of code.
SQLite; command line; Unix sockets; 2 source files, 26 lines of code.
MariaDB; command line; web browser; Nginx; Unix sockets; 2 source files, 69 lines of code.
: 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.
( get-app set-app
( decode-base64 encode-base64
( delete-cookie get-cookie set-cookie
( begin-transaction commit-transaction current-row database_config_file database_queries delete-query on-error prepared_statements query-result rollback-transaction run-query
( debugging trace-run
( decrypt-data derive-key encrypt-data hash-string random-crypto random-string
( error_code error_handling on-error report-error
( 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
( new-fifo purge-fifo read-fifo rewind-fifo write-fifo
( 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
( deploying_application how_vely_works quality_control rename_files SELinux vely vely_architecture vely_removal vf vv why_C_and_Vely
( get-hash new-hash purge-hash read-hash resize-hash write-hash
( decode-hex encode-hex
( delete-json new-json read-json
( dot inline_code statement_APIs syntax_highlighting unused-var
( delete-mem manage-memory memory_handling new-mem resize-mem
( finish-output flush-output output_statement p-dbl pf-out pf-url pf-web p-num p-out p-path p-url p-web
( exec-program exit-code
( get-req input-param request-body set-input set-req
( 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
( application_setup CGI Client_API command_line containerize_application FastCGI FastCGI_client plain_C_FCGI
( copy-string count-substring lower-string split-string trim-string upper-string write-string
( decode-url encode-url
( json-utf8 utf8-json
( call-web out-header send-file silent-header
( decode-web encode-web
( connect_apache_tcp_socket connect_apache_unix_socket connect_nginx_tcp_socket connect_nginx_unix_socket
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
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.
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.
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.
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.
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