What Axum Does
- Macro-free routing — plain function handlers
- Extractors — type-safe request data extraction (Json, Path, Query, State)
- Tower middleware — use any Tower middleware (timeout, rate-limit, tracing)
- WebSocket — built-in upgrade support
- State sharing — via Extension or State extractor
- Nested routers — composable sub-routers
- Error handling — typed error responses
Comparison
| Framework | Macro | Tower | Tokio-native |
|---|---|---|---|
| Axum | None | Full | Yes |
| Rocket | Heavy | No | Own runtime |
| Actix Web | Moderate | No | Own runtime |
FAQ
Q: Why choose Axum? A: It's officially from Tokio and integrates seamlessly with the whole Tokio ecosystem (Hyper, Tower, Tonic). If you already use Tokio, Axum is the most natural choice.
Sources
- Docs: https://docs.rs/axum
- GitHub: https://github.com/tokio-rs/axum
- License: MIT