https://github.com/lajule/rac
REST API in C
https://github.com/lajule/rac
c libuv rest
Last synced: 5 months ago
JSON representation
REST API in C
- Host: GitHub
- URL: https://github.com/lajule/rac
- Owner: Lajule
- Created: 2026-01-01T17:11:32.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-26T17:35:42.000Z (5 months ago)
- Last Synced: 2026-01-27T05:43:04.214Z (5 months ago)
- Topics: c, libuv, rest
- Language: C
- Homepage:
- Size: 109 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rac
๐ 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.
## โจ Features
- โก **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
## ๐ Prerequisites
```bash
sudo apt-get update
sudo apt-get install -y \
libuv1-dev \
libllhttp-dev \
libpq-dev \
build-essential
```
## Environment
```bash
UV_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
```
## ๐ Acknowledgments
- [libuv](https://libuv.org/) - Cross-platform async I/O
- [llhttp](https://github.com/nodejs/llhttp) - Fast HTTP parser
- [cJSON](https://github.com/DaveGamble/cJSON) - Lightweight JSON parser
- [PostgreSQL](https://www.postgresql.org/) - Powerful database
- [libpq](https://www.postgresql.org/docs/current/libpq.html) - PostgreSQL C API
---
**Built with โค๏ธ and C** - Because sometimes, less is more.