🚀 High-Performance REST API in C
Bye Golang, Ciao Rust, Thank you AI, Welcome back C!
A REST API built entirely in C with: async I/O, connection pooling, and thread-based request handling.
- ⚡ Asynchronous I/O - Built on libuv event loop for maximum performance
- 📊 PostgreSQL Pool - Thread-safe connection pooling
- 🧵 Thread Pool - Multi-threaded request processing
- 🔄 HTTP Parser - Modern llhttp parser for efficient request handling
- 📦 JSON Support - Request/response serialization with cJSON
sudo apt-get update
sudo apt-get install -y \
libuv1-dev \
libllhttp-dev \
libpq-dev \
build-essentialUV_THREADPOOL_SIZE=4
LOG_LEVEL=1
DB_POOL_SIZE=4
DB_CONNINFO="host=postgres dbname=mydb user=mydb password=p@ssw0rd"
HTTP_PORT=8080
HTTP_BACKLOG=128- libuv - Cross-platform async I/O
- llhttp - Fast HTTP parser
- cJSON - Lightweight JSON parser
- PostgreSQL - Powerful database
- libpq - PostgreSQL C API
Built with ❤️ and C - Because sometimes, less is more.