Axum
Open SourceAn ergonomic and modular web framework built with Tokio, Tower, and Hyper.
Published 29 May 2026 · Last updated 27 September 2026
Scores
Popularity1/5
Respected within the Rust community; Rust's overall small size keeps this niche.
Learning Curve3/5
Rust knowledge is required; async handlers and extractor patterns take meaningful adjustment.
Flexibility4/5
Rust type system enables powerful handler composition; extractor pattern is highly extensible.
Performance5/5
Rust with Tokio async runtime; one of the fastest web frameworks in any language.
Portability4/5
Rust web concepts transfer to Actix and other frameworks; handler patterns are similar.
About Axum
Axum is a Rust web framework maintained by the Tokio team, which makes it the most tightly integrated choice in Rust's async ecosystem. It is built on Hyper for HTTP and Tower for middleware, keeping their performance while adding an ergonomic layer for routing and handlers.
The design is macro-free: routes are plain async functions, and request data (path parameters, query strings, JSON bodies, headers, cookies, shared state) is pulled out through typed extractors rather than attribute macros. That keeps compile errors readable, compile times reasonable, and handlers easy to unit-test without starting a server.
Middleware runs entirely on Tower's Service and Layer abstractions, so middleware written for Axum also works with Hyper and Tonic (gRPC) services. The tower-http crate provides ready-made layers for CORS, tracing, compression, request IDs, timeouts, and authentication. The framework itself forbids unsafe code, and recent versions use native async functions in traits, so no #[async_trait] macro is needed.
Axum is free under the MIT licence and has become the usual starting point for new Rust HTTP services. It is still pre-1.0, so minor releases (0.6, 0.7, 0.8) have brought breaking changes, and it is deliberately small: databases, templating, sessions, and auth come from separate crates such as SQLx, Askama, and tower-sessions. Actix Web edges it in some raw-throughput benchmarks, while Axum usually wins on ergonomics and ecosystem fit.
Key Features
- Macro-free routing: handlers are plain async functions
- Typed extractors for path, query, JSON, headers, cookies, and state
- Tower and tower-http middleware for timeouts, tracing, CORS, and compression
- Framework code forbids unsafe Rust
- Thin layer over Hyper with near-raw async performance
- Middleware shared with Hyper and Tonic (gRPC) services
- Native async functions in traits, with no async_trait macro
- Predictable error handling through IntoResponse
Pros
- Maintained by the Tokio team, with first-class fit in the main Rust async stack
- Macro-free design keeps handlers easy to read and unit-test
- Tower middleware is shared across the Rust ecosystem, avoiding framework lock-in
- Gentler learning curve and clearer errors than Actix Web
- The type system catches many request-handling bugs at compile time
Cons
- Still pre-1.0, and minor versions have required real migration work
- Few batteries: no built-in ORM, templating, sessions, or auth
- Writing custom Tower middleware has a steep learning curve
- Slightly behind Actix Web in some synthetic throughput benchmarks
Axum Pricing
Open SourceTools Related to Axum
Built on (1)
Axum is a Rust web framework focusing on ergonomics and modularity.
Alternatives to Axum(13)
Both are lightweight, high-performance web frameworks — Axum uses Rust, Gin uses Go.
Axum is a Rust async framework; FastAPI is a Python async framework — both are async API frameworks, different language ecosystems.
Axum is a Rust async framework; Fastify is a high-performance Node.js framework — different language ecosystems.
Axum is a lightweight Rust framework; Django is a Python batteries-included framework — different language and philosophy.
Axum is a Rust async web framework; Express is a minimal Node.js framework — same minimalist philosophy, different language ecosystems.
Axum is a lightweight Rust framework; Spring Boot is a Java enterprise framework — different language ecosystems and performance profiles.