What Rocket Does
- Type-safe routing — routes validated at compile time
- Request guards — type-based access to request data
- Data guards — typed request body parsing
- Fairings — middleware-like lifecycle callbacks
- Managed state — thread-safe shared state
- Templates — Tera, Handlebars via rocket_dyn_templates
- Async — fully async since Rocket 0.5
- Forms — multipart, validated form handling
- Testing — built-in local Client for tests
Comparison
| Rust Framework | Style | Async | Macro-heavy |
|---|---|---|---|
| Rocket | Rails-like | Yes (0.5+) | Yes |
| Axum | Tower-based | Yes | No |
| Actix Web | Actor | Yes | Moderate |
| Warp | Filter combinators | Yes | No |
FAQ
Q: Rocket vs Axum? A: Rocket is more opinionated with fast development (Rails-like DX); Axum is more modular and seamlessly integrates with the Tokio/Tower ecosystem.
Sources
- Docs: https://rocket.rs/guide
- GitHub: https://github.com/rwf2/Rocket
- License: MIT + Apache 2.0