🚧 IN DEVELOPMENT 🚧
This project is being developed as a fun experiment in building a RESTful web application using C.
- 🚀 Fast (compare?)
- ✨ lightweight (compare?)
- Simple Router with middleware
- PostgreSQL client
- Asynchronous I/O with libuv
- Feature-Based logging
- Tests with cmocka
- Benchmarks, Docker scratch image, gihub actions ..
The web server will NOT handle the following tasks (delegated to HAProxy/Traefik/Nginx):
- SSL/TLS Termination
- Static Content Serving and Caching
- Traffic Compression (Gzip/Brotli)
- Load Balancing
- Rate Limiting
- HTTP Parser: picohttpparser
- Sockets: libuv
- PostgreSQL: libpq
- JSON Parsing: parson
- Unit Testing : cmocka
# MacOS
brew install libuv libpq cmocka
# Ubuntu
apt install pkg-config libpq-dev libuv1-dev libcmocka-dev
# Windows Support?
# Most likely not, I don’t have a Windows machine, but technically it’s possible.
# Initialize the submodules (if not done already)
git submodule update --init --recursive
make
make clean
make test
make run
To benchmark the server, you can use tools like wrk and ab:
# MacOS
brew install wrk ab
wrk -t4 -c100 -d30s http://127.0.0.1:8080
ab -n 10000 -c 100 http://127.0.0.1:8080/
# Generate `compile_commands.json`
make .vscode/compile_commands.json
# Format code
make format
# Run tests in docker
make test-docker
make test-docker-linux-amd64
make test-docker-linux-arm64
Feel free to give it a star, share your ideas, or open an issue! But please, no pull requests, as this is an educational project and will likely be archived once it's completed.