2024-11-26 17:16:04 +01:00
2025-10-25 01:30:46 +02:00
2025-10-25 01:30:46 +02:00
2025-08-04 23:29:07 +02:00
2025-10-24 20:20:26 +02:00
2025-08-02 16:33:47 +02:00
2025-08-09 19:43:21 +02:00
2024-11-10 18:56:52 +01:00
2024-11-08 17:30:06 +01:00
2025-09-16 22:38:25 +02:00
2025-10-24 19:54:55 +02:00

cws

A minimal web server. This is a personal project; it is not intended to be a production-ready tool, nor will it ever be. Use it at your own risk.

Requirements

  • meson
  • libcyaml
  • myclib (on my profile)
  • doxygen
    • Optional, just to build the docs. It requires dot.

How to build

$ meson setup build
$ cd build
$ meson compile

And then run cws!

Docs

$ git submodule update --init
$ doxygen

And then open the docs/html/index.html.

Roadmap

  • HTTPS support with TLS
  • Support for virtual hosts
  • CLI args

Future

  • Custom web pages (404)
  • IPv6 compatible
  • Multithreading to handle concurrent requests
  • Logging
  • Compression (Gzip)
  • Reverse proxy
  • PHP-FPM

Performance

This test was performed using wrk.

wrk command
$ wrk -t12 -c400 -d30s http://127.0.0.1:3030/index.html
Running 30s test @ http://localhost:3030
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.45ms    2.37ms  91.92ms   95.45%
    Req/Sec    10.08k     1.33k   19.57k    82.30%
  3621422 requests in 32.47s, 2.55GB read
  Socket errors: connect 0, read 0, write 0, timeout 395
Requests/sec: 111514.25
Transfer/sec:     80.51MB
Description
A minimal Web Server (gh mirror)
Readme GPL-3.0 572 KiB
Languages
C 71.6%
HTML 26.5%
Meson 1.9%