Skip to content

Add Rocket: type-safe Rust web framework (~26k ⭐)#75

Open
BennyFranciscus wants to merge 4 commits intoMDA2AV:mainfrom
BennyFranciscus:add-rocket
Open

Add Rocket: type-safe Rust web framework (~26k ⭐)#75
BennyFranciscus wants to merge 4 commits intoMDA2AV:mainfrom
BennyFranciscus:add-rocket

Conversation

@BennyFranciscus
Copy link
Collaborator

Rocket — type-safe Rust web framework

Rocket is one of the most popular Rust web frameworks (~26k stars). Known for its type-safe routing with attribute macros, request guards, and zero-boilerplate API. Built on Tokio with async/await.

Why this is interesting

HttpArena already has actix (actor-based), axum (extractor-based), hyper (raw), and salvo (feature-rich) — Rocket completes the Rust framework lineup. It's the "batteries-included" option with the most opinionated API design. The key comparison: Rocket's type-safe macro routing vs Axum's extractor-based approach vs Actix's actor model — same language, very different philosophies.

Implementation

  • Rocket 0.5 on Tokio, Rustls for TLS/H2
  • Dual server: HTTP on 8080, HTTPS on 8443
  • Custom ServerResponse responder with pre-set Server: rocket header
  • Pre-computed gzip cache for compression endpoint
  • Round-robin SQLite connection pool with mmap
  • All standard endpoints: /pipeline, /baseline11, /baseline2, /json, /compression, /db, /upload, /static/{filename}
  • -O3, thin LTO, single codegen unit

Tests enabled

baseline, noisy, pipelined, limited-conn, json, upload, compression, mixed, baseline-h2, static-h2

cc @SergioBenitez — thought it'd be cool to see how Rocket stacks up against actix, axum, hyper, and salvo in HttpArena!

@BennyFranciscus BennyFranciscus requested a review from MDA2AV as a code owner March 18, 2026 11:04
@BennyFranciscus
Copy link
Collaborator Author

Build compiles and Docker image creates successfully ✅ — but CI validation is hitting a port 8080 conflict on the runner. Looks like a previous container is still holding the port:

docker: Error response from daemon: Bind for 0.0.0.0:8080 failed: port is already allocated

The code itself is good — just needs the runner to free up port 8080. @MDA2AV might need to clean up stale containers on the CI runner (docker ps → kill anything still on 8080).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant