babelouest/ulfius logo

babelouest/ulfius

Free

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

FreeFree tier
Type
Open Source
Company
babelouest

About babelouest/ulfius

Ulfius is a C-based HTTP framework designed for building REST APIs, webservices, and HTTP endpoints with a small memory footprint, making it suitable for embedded systems. It leverages GNU Libmicrohttpd for the backend web server, Jansson for JSON handling, and Libcurl for HTTP/SMTP client requests. The framework supports streaming large amounts of data, WebSocket services (both server and client), and includes a CLI tool (uwsc) for connecting to remote WebSockets. It provides a callback-based endpoint system, client request execution with parsed responses, and comprehensive documentation via INSTALL.md and API.md.

Key Features

Create REST APIs and HTTP endpoints in C with callback functions
Stream large amounts of data with reduced memory footprint
Server-side WebSocket service with dedicated callbacks
Client HTTP/HTTPS and SMTP request execution with parsed responses
Client WebSocket request execution
CLI tool (uwsc) to connect to remote WebSockets
JSON data integration via Jansson library
Multi-threaded webservice execution

Pros & Cons

Pros
  • Small memory footprint suitable for embedded systems
  • Based on mature libraries (Libmicrohttpd, Jansson, Libcurl)
  • Supports both server and client WebSockets
  • Built-in streaming capability
  • Well-structured callback API for endpoint handling
  • Comprehensive example programs provided
Cons
  • Requires C programming knowledge, not suitable for non-C developers
  • Manual memory management required
  • Documentation is reference-based (API.md) rather than tutorial-style
  • Limited to HTTP-based protocols; no built-in support for other transports

Best For

Building REST APIs in C for embedded systemsCreating lightweight web applications with limited resourcesImplementing WebSocket servers and clients in CStreaming large data sets over HTTPReplacing higher-level frameworks with a low-memory alternative

FAQ

How do I install Ulfius?
Installation instructions are provided in the INSTALL.md file in the repository. The framework can be built using CMake and requires dependencies like GNU Libmicrohttpd, Jansson, and Libcurl.
Where can I find the API documentation?
API documentation is available in the API.md file in the repository. An online Doxygen-generated version is also available; see the repository's doc folder or the GitHub pages.
Does Ulfius support WebSockets?
Yes, Ulfius supports both server-side and client-side WebSocket services with dedicated callback functions for message exchange.
Can I stream data with Ulfius?
Yes, Ulfius allows streaming large amounts of data with a reduced memory footprint, making it suitable for high-throughput applications.