Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kemal | 3,485 | 2 months ago | 15 | mit | Crystal | |||||
Fast, Effective, Simple Web Framework | ||||||||||
Webdis | 2,663 | 2 months ago | 53 | bsd-2-clause | C | |||||
A Redis HTTP interface with JSON output | ||||||||||
Mojo | 2,494 | 192 | 564 | 19 days ago | 737 | September 12, 2022 | 70 | artistic-2.0 | Perl | |
:sparkles: Mojolicious - Perl real-time web framework | ||||||||||
Uvicorn Gunicorn Fastapi Docker | 2,230 | 11 days ago | 38 | mit | Python | |||||
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python with performance auto-tuning. Optionally with Alpine Linux. | ||||||||||
Httpexpect | 2,202 | 70 | 110 | a day ago | 23 | July 20, 2021 | 34 | mit | Go | |
End-to-end HTTP and REST API testing for Go. | ||||||||||
Crossbar | 2,026 | 3 months ago | 268 | other | Python | |||||
Crossbar.io - WAMP application router | ||||||||||
Facil.io | 1,747 | 4 days ago | 24 | mit | C | |||||
Your high performance web application C framework | ||||||||||
Ejdb | 1,368 | 1 | 2 | 2 months ago | 48 | October 26, 2021 | 29 | mit | C | |
:snowboarder: EJDB2 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings. Docker image. | ||||||||||
Treefrog Framework | 1,198 | 16 days ago | December 09, 2017 | 3 | bsd-3-clause | C++ | ||||
TreeFrog Framework : High-speed C++ MVC Framework for Web Application | ||||||||||
Ulfius | 932 | 11 days ago | 9 | lgpl-2.1 | C | |||||
Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services |
HTTP Framework for REST Applications in C.
Based on GNU Libmicrohttpd for the backend web server, Jansson for the json manipulation library, and Libcurl for the http/smtp client API.
Used to facilitate creation of web applications in C programs with a small memory footprint, as in embedded systems applications.
You can create webservices in HTTP or HTTPS mode, stream data, or implement server websockets.
The source code of a hello world using Ulfius is the following:
/**
* test.c
* Small Hello World! example
* to compile with gcc, run the following command
* gcc -o test test.c -lulfius
*/
#include <stdio.h>
#include <ulfius.h>
#define PORT 8080
/**
* Callback function for the web application on /helloworld url call
*/
int callback_hello_world (const struct _u_request * request, struct _u_response * response, void * user_data) {
ulfius_set_string_body_response(response, 200, "Hello World!");
return U_CALLBACK_CONTINUE;
}
/**
* main function
*/
int main(void) {
struct _u_instance instance;
// Initialize instance with the port number
if (ulfius_init_instance(&instance, PORT, NULL, NULL) != U_OK) {
fprintf(stderr, "Error ulfius_init_instance, abort\n");
return(1);
}
// Endpoint list declaration
ulfius_add_endpoint_by_val(&instance, "GET", "/helloworld", NULL, 0, &callback_hello_world, NULL);
// Start the framework
if (ulfius_start_framework(&instance) == U_OK) {
printf("Start framework on port %d\n", instance.port);
// Wait for the user to press <enter> on the console to quit the application
getchar();
} else {
fprintf(stderr, "Error starting framework\n");
}
printf("End framework\n");
ulfius_stop_framework(&instance);
ulfius_clean_instance(&instance);
return 0;
}
Create a webservice in a separate thread, the endpoint is identified by its method (ex: GET
, POST
, PUT
, DELETE
, etc.) and its URL path with its optional parameters (ex: /api/doc/@id
). The webservice is executed in a callback function.
Stream large amount of data with a reduced memory footprint.
Websocket service, the websocket messages exchange is executed in dedicated callback functions.
Client http[s] and smtp requests execution, the response is parsed in a dedicated structure.
Client websocket request execution, the websocket messages exchange is executed in dedicated callback functions.
Create a websocket service application
Create websocket client application
CLI to connect to a remote websocket: uwsc
See INSTALL.md file for installation details
See API.md file for API documentation details
See the online documentation for a doxygen format of the API documentation.
Example programs are available to understand the different functionalities available, see example_programs folder for detailed sample source codes and documentation.
Example callback functions are available in the folder example_callbacks. The example callback functions available are:
I'm open for questions and suggestions, feel free to open an issue, a pull request or send me an e-mail if you feel like it!
You can visit the IRC channel #ulfius on the Libera.Chat network.