High performance
Small C runtime with direct control over server behavior.
HTTP/2 server library for C
A compact Linux library with routing, middleware, JSON helpers, uploads, TLS, compression, metrics and graceful shutdown.
#include <libchttpx.h>
static void health(chttpx_request_t* req, chttpx_response_t* res)
{
(void)req;
*res = cHTTPX_ResMessage(cHTTPX_StatusOK, "healthy");
}
int main(void)
{
chttpx_app_t app;
cHTTPX_AppInit(&app);
chttpx_config_t config = cHTTPX_DefaultConfig();
config.port = 8080;
chttpx_serv_t* server = cHTTPX_AppServer(&app, "main", &config);
chttpx_router_t router = cHTTPX_RoutePathPrefix(server, "");
cHTTPX_Get(&router, "/health", health);
return cHTTPX_AppRun(&app);
}
Small C runtime with direct control over server behavior.
Routing, responses and helpers without repetitive HTTP plumbing.
Middleware, TLS, gzip, metrics, JSON, uploads and custom limits.
Module-by-module documentation and runnable examples.
Read the code, contribute, fork it and build on top of it.
Handlers contain application logic instead of repetitive request parsing, response building and server boilerplate.