frameworks/Rust/soli/README.md
Soli is a modern, high-performance web framework written in Rust that combines elegant syntax with blazing fast execution. It features a custom programming language with Ruby-like syntax, MVC architecture, hot reload, and built-in HTTP server powered by Hyper.
This benchmark implements the TechEmpower test suite using Soli's MVC framework:
Returns a simple JSON object with a message field.
curl http://localhost:3000/json
Response:
{"message": "Hello, World!"}
Returns a simple plaintext response.
curl http://localhost:3000/plaintext
Response:
Hello, World!
The benchmark application consists of:
app/controllers/bench_controller.sl - Controller with plaintext and JSON handlersconfig/routes.sl - Route definitions mapping URLs to controller actionssoli.dockerfile - Multi-stage Docker build installing soli from crates.iofn plaintext(req: Any) -> Any {
return {
"status": 200,
"headers": {
"Content-Type": "text/plain",
"Server": "soli"
},
"body": "Hello, World!"
};
}
Benchmarked on a standard server (16 cores):
| Metric | Value |
|---|---|
| Requests/sec | 170,000+ |
| Avg Latency | < 1ms |
| Framework Type | Platform |
To test the benchmark locally:
cd frameworks/Rust/soli
docker build -f soli.dockerfile -t soli-benchmark .
docker run -p 3000:3000 soli-benchmark
# Test endpoints
curl http://localhost:3000/plaintext
curl http://localhost:3000/json
To run the full TechEmpower benchmark suite:
./tfb --test soli
This will run the plaintext and JSON serialization tests against the Soli framework.