riolet/WAFer logo

riolet/WAFer

Free

WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.

FreeFree tier
Type
Open Source

About riolet/WAFer

WAFer is an ultra-lightweight, scalable server-side web applications framework written in C. It offers a simple programming model similar to Node.js for C programmers: developers copy a single server.c file, implement a request handler function, and compile using a Makefile. The framework is designed to have a memory footprint far smaller than Node.js and other bulky frameworks. WAFer supports compile-time configuration options including single-threaded or multi-threaded operation, select-based or epoll-based event loops, and a C10K mode for handling thousands of concurrent connections. The default server port is 4242, adjustable via the PORT environment variable. The open-source project is hosted on GitHub under the GPL-2.0 license.

Key Features

Ultra-lightweight memory footprint, a fraction of Node.js and other frameworks
Simple API: copy server.c, implement void server(Request request), compile with make
Compile-time configuration: single-threaded or multi-threaded (THREADS=n)
Select or epoll event loop (LOOP=epoll)
C10K mode for high concurrency (LOOP=epoll MAX_CON_CONS=n)
Configurable port via PORT environment variable (default 4242)

Pros & Cons

Pros
  • Extremely lightweight with minimal resource usage
  • Simple programming model, easy to get started by modifying a single file
  • Flexible compile-time configuration to tailor performance to specific needs
  • Supports high concurrency with C10K mode and epoll

Best For

Building scalable server-side web applications in CDeveloping networking applications with an event-loop architectureLearning or prototyping web server development in C

FAQ

What is WAFer?
WAFer is a C language-based ultra-light scalable server-side web applications framework, similar to Node.js for C programmers.
How do I create a web server with WAFer?
Copy server.c (e.g., as myserver.cs), put your code inside the function void server(Request request), and compile with make SERVER=myserver.
What configurations are available at compile time?
You can choose single-threaded or multi-threaded (THREADS=n), select or epoll event loop (LOOP=epoll), enable C10K mode (LOOP=epoll MAX_CON_CONS=n), and set the port via the PORT environment variable (default 4242).
Is WAFer free to use?
Yes, WAFer is open-source software licensed under GPL-2.0 and available for free on GitHub.