Move to Rust at your own pace
Claviron is an application-first toolkit for building and running services. Run Rust alongside your existing applications. Keep them together as a modular monolith or distribute them across independent processes.
Build your own Edge and serve public traffic directly. Terminate TLS, route requests, serve files, and dispatch to your applications at the Edge. Your application controls every layer, from listeners and access rules to handlers and response policies. Enable what you need. An omitted layer adds no work per request.
Taste the power of Orbit. Drop the sockets between sibling applications on the same host. No dial. The connection starts with the runtime. As each application boots, it joins its Orbit fleet. Peers exchange requests and events directly through shared memory. Orbit uses futexes, umtx, and shared address waits.
The same Axum app served 2.57× as many responses per second through Orbit Link as through Caddy's HTTP/1.1 reverse proxy, using 63% less CPU per response across the frontend and app. All three paths passed the same 128-connection HTTP/1.1 load phase with zero errors.
| Path to Axum | Responses/s | Combined CPU/response |
|---|---|---|
| Caddy → HTTP/1.1 upstream | 60,058 | 296.23 µs |
| Claviron Edge → HTTP/1.1 upstream | 118,736 | 128.17 µs |
| Claviron Edge → Orbit Link | 154,190 | 108.30 µs |
Axum proxy benchmark and methodology
Keep your application behind Claviron and add a Rust intercept for the first route you want to move. Claviron runs the Rust handler first. Requests it leaves unhandled continue to the existing application. You can move one API, a hot path, or a security check at a time while keeping the public URL and host policies.
Start with a route that benefits from Rust's type and memory safety, or one where you want to reduce latency or CPU use. Claviron can run the new Rust code alongside your PHP, Python, JavaScript, Go, Java, or C/C++ application. Each part can keep its existing runtime and move on its own schedule.
- Role composition · Hot pipeline · Edge backends
- Early data · Connection hijack · Lifetime policy
- Graceful ownership · Hot client pool · Worker adoption · Incarnation masking
- Fleet awareness · Orbit Cell · Orbit Link · Link Invoke
- Production environment · All design contracts
Start with the Edge example or the Edge configuration guide.
Add ACME certificate automation and gRPC administration with typed service registration. DNS plugs into the same lifecycle through its registration function. Use compatible releases of the three backend crates and enable their server features.
async fn main() -> Result<()> {
Server::new()
.config_dir("config")
.workers(Workers::Available)
.with_services::<(AcmeService, GrpcAdmin)>()
.register(claviron_dns::register)
.serve()
.await
}ACME · gRPC administration · DNS · Runnable examples
- Rust — Serve an Axum or Warp application with Claviron Runner, or add reusable backends and layers to your Edge.
- PHP — Embed PHP or use FastCGI. Run Laravel with Lumenize or Symfony with Skene.
- Python — Run FastAPI and other ASGI applications with Gufi.
- JavaScript, Go, Java, and C/C++ — Use the native bindings to connect an application to Claviron over Orbit Link. Browse runnable examples.
TLS first. Require mutual TLS on the virtual host that needs it. On a TLS listener, the Edge verifies client certificates during the handshake, before any request reaches your application.
admin.example.test:
transport:
non_ssl: reject
tls:
client_auth:
mode: required
ca_bundle: certs/client-ca.pemLet your Edge apply CORS and verify CSRF before a request reaches embeded scripts.
routes:
/account:
csrf: trueWatch configuration with Congif. Enable config-watch for native file
notifications on watched sources. A change to a single setting can trigger
reload. Claviron validates and prepares the candidate before atomically
publishing the new snapshot. Invalid edits leave the active snapshot in place.
Mount asset directories, serve directory indexes, and configure try_files
or an SPA fallback. Large files stream from disk with backpressure. Small
files can be cached in memory and shared across workers when the fleet cache
is enabled.
| Capability | HTTP specification |
|---|---|
| ETag and Last-Modified, conditional requests, and single byte ranges | RFC 9110 §§8.8, 13–14 |
| Browser freshness via Cache-Control and Expires, with opt-in immutable assets | RFC 9111 §5, RFC 8246 |
| Negotiated Brotli and Zstandard representations | RFC 9110 §12.5, RFC 7932, RFC 8878 |
Static file configuration and caching
Plain HTTP. At the highest load all three configurations passed in the same Linux HTTP/1.1 run, Claviron with Axum delivered 3.27× Caddy's throughput with 68% less server CPU per response.
| Server | Responses/s | CPU/response |
|---|---|---|
| Caddy 2.11.9 | 268,817 | 74.76 µs |
| Claviron + Axum, 32 workers | 879,753 | 24.09 µs |
A separate run reached 1,045,500 responses/s with Claviron and Warp. Matched Caddy comparison · Warp peak
Pentaglot.
Embedded libphp served 227k JSON responses/s and the C module served
306k responses/s in the same benchmark suite. The PHP route uses a
persistent application with OPcache warmed at startup and runs without
Composer or a framework. Pentaglot results and setup
Persistent PHP. With 128 PHP instances and 1,024 connections, both servers completed the five-minute runs without errors. Each cell shows responses per second and server CPU per response.
| Workload | Claviron | FrankenPHP 1.13.5 |
|---|---|---|
| Plain PHP | 299,896 / 64.72 µs | 90,015 / 227.23 µs |
| Symfony, with Skene on Claviron | 88,139 / 312.43 µs | 41,398 / 565.52 µs |
FrankenPHP comparison · Laravel/Lumenize results
On Linux with 1,024 HTTP/1.1 connections, Claviron Other delivered 93% of native Hyper's throughput at the highest load both passed. Its 40 supervised worker processes kept meeting the SLA up to 38,912 outstanding requests.
| Server | Responses/s at 16,384 outstanding | Server CPU/response | Last passing outstanding target |
|---|---|---|---|
| Native Hyper, 40 runtime threads | 1,811,355 | 14.50 µs | 16,384 |
| Claviron Other, 40 worker processes | 1,678,101 | 16.31 µs | 38,912 |
HTTP/1.1 benchmark and methodology
With Claviron for Apple, see embedded and linked applications together and add workers from the same app.
Crates.io · API documentation · Contributing · Security
Examples · Bench HTTP · Break
Licensed under MIT or Apache 2.0.

