mrkeyoor.com_
Tue 01 Sept 17:43 UTC
Webevaluationupdated 26 Aug 2026

axum review

Axum is a Rust library for routing HTTP requests into async handler functions. It parses request parts through typed extractors, turns return values into responses, and uses Tower services for middleware so web applications can share infrastructure with Hyper and tonic.

+34stars / 7d
Verdict

Our Axum run built in 26 seconds and passed all 1,280 tests in 111 seconds, the cleanest measured result in this group. Use axum for Tokio-based APIs when Tower compatibility is an advantage and your team is happy choosing the rest of the stack. Stay on the released 0.8.x line for production, because the default branch explicitly carries breaking 0.9 work.

We ran it

Lab card: what happened when we ran axumScreenshot of axum (github.com/tokio-rs/axum)
Install✓ · 19s64 packages
Build✓ · 26s
Tests✓ · 111s1280 passed · 0 failed of 1280 (cargo test)
Repo498 files~45,947 lines of source · 1.9 MB · 2 CI workflows

Answers from our run

Does axum build from source?

Dependencies installed in 19 seconds (64 packages), and the build succeeded in 26 seconds. We cloned commit 3d78036 into a clean Debian container with 3 CPUs and no project-specific setup.

Do axum's tests pass?

Yes: 1280 of 1280 passed when we ran the project's own test command (cargo test). Some failures need services or credentials a bare container does not have.

Who should not use axum?

Developers expecting a batteries-included framework with an ORM, migrations, admin UI, sessions, and project scaffolding: Axum deliberately stays close to routing and request handling.

What are the alternatives to axum?

Actix Web, Poem, Salvo. Our Axum run built in 26 seconds and passed all 1,280 tests in 111 seconds, the cleanest measured result in this group.

Setup5/564 packages installed; build and all 1,280 tests passed
Docs5/5Clear core model, examples, crate docs, and version warning
Community5/5Active August 2026 work under the Tokio organization
Maturity5/5Stable 0.8 line with broad tests and Tower integration

Discussed on

  1. hnWeb framework Axum v0.8.0 (rust)4 points

Who it’s for

Rust teams already using Tokio that want a small, typed HTTP layer.
API developers who prefer function arguments as request validation and extraction.
Services that need Tower middleware shared with Hyper or tonic.
Teams comfortable assembling authentication, persistence, templates, and observability from crates.

Who it’s NOT for

Developers expecting a batteries-included framework with an ORM, migrations, admin UI, sessions, and project scaffolding: Axum deliberately stays close to routing and request handling.
Teams that do not want to learn Tower's service and layer model: Axum has no separate middleware system.
Production users copying the default branch today: the README says main contains breaking work toward 0.9 and points released users to the 0.8.x branch.
Projects pinned below Rust 1.80: axum 0.8.9 raised the minimum supported Rust version to 1.80.
Beginners who want framework conventions to decide application structure; Axum leaves many architecture choices to the application.

Setup reality

Our sandbox installed 64 Rust packages in 19 seconds. The build passed in 26 seconds, and all 1,280 tests passed in 111 seconds. The checkout was 1.9 MB with 498 files and about 45,947 source lines.

A basic service needs Rust 1.80 or newer, Tokio, a listener, routes, and application state. Real deployments still need TLS or a proxy, graceful shutdown, tracing, limits, authentication, and chosen Tower middleware. Database and template choices are external.

Our scan found 2 CI workflow files, no Dockerfile, and no tests directory. Tests can live alongside Rust modules and examples, so the missing top-level directory does not conflict with the 1,280 passing cases.

Typed extractors make handlers read like request contracts

Axum routes methods and paths to ordinary async functions. Handler arguments declare what should be taken from the request: a path segment, query values, headers, shared state, or a JSON body. Return types implement response conversion, so a tuple can carry a status code and JSON value without a separate response builder. The API avoids route macros and lets Rust's type system catch incompatible handler shapes during compilation.

This style is especially pleasant for JSON services. Parsing and rejection behavior sit at the function boundary, while business logic can receive already validated Rust values. Custom extractors let an application centralize authentication or tenant lookup. The cost appears in compiler errors when trait bounds become complicated. Teams new to Rust web types may spend time learning why a handler does not satisfy Handler, even when the final code is concise.

Tower is the middleware system, not an optional adapter

Axum does not maintain a parallel middleware abstraction. Routers and handlers fit Tower's Service model, so applications can use layers for timeouts, tracing, compression, authorization, request IDs, and other cross-cutting behavior. The same service concepts appear around Hyper and tonic, which helps a platform team share policies between HTTP and gRPC components.

Tower compatibility is the main reason to choose Axum over another ergonomic Rust router. It is also a learning requirement. Layer order changes behavior, error types must line up, and a timeout only helps when cancellation and downstream work behave as intended. Axum gives the pieces a consistent interface; it does not design the middleware stack or prove that the ordering is safe for your service.

What happened when we ran it

Our run cloned commit 3d78036 into a fresh unprivileged Rust container with 3 CPUs, 12 GB of RAM, and no secrets. Cargo installed 64 packages in 19 seconds. The repository built successfully in 26 seconds, then all 1,280 tests passed in 111 seconds. No failed case or timeout appeared in the supplied result.

The checkout was compact: 498 files, roughly 45,947 lines of source, 1.9 MB on disk before dependencies, and 2 CI workflow files. Our scan found no Dockerfile and no tests directory. Rust projects commonly keep unit tests beside modules and integration coverage in examples or workspace crates, so directory shape is a weak signal here. The 1,280 executed cases are the stronger evidence.

These measurements cover the repository, not request throughput. We did not run an HTTP load test, compare Axum with Hyper, or measure memory use. The README calls Axum a thin Hyper layer and links external benchmarks, but those are not our results. Performance claims for a production decision need the application's handlers, middleware, allocator, TLS path, runtime settings, and target hardware.

Axum supplies HTTP composition rather than a whole application stack

A minimal server needs a Tokio runtime, a router, and a TCP listener. From there, the application chooses serialization, database access, migrations, authentication, sessions, templates, background jobs, configuration, and error reporting. This freedom keeps Axum usable for small APIs and unusual service architectures. It can also produce inconsistent house patterns if every team assembles a different crate set.

Examples and crate documentation show WebSockets, server-sent events, multipart forms, state, error handling, middleware, TLS approaches, and testing. They are building blocks rather than a generated project layout. An organization adopting Axum should provide its own service template with tracing, request limits, shutdown, health endpoints, and dependency policy already decided. That local template supplies the conventions Axum intentionally omits.

The library forbids unsafe code in its own crate. That is a useful boundary, though dependencies and application code can still contain unsafe Rust. Axum's MIT license is simple for commercial use, and contributions default to the same license unless stated otherwise. Neither fact removes the need to audit the crates selected around it.

The released 0.8 line and default branch serve different users

The README puts a prominent warning above its example: maintainers are working toward axum 0.9, and main contains breaking changes. Released users should read the 0.8.x branch and the documentation for the exact crate version in Cargo.lock. Copying an example from main into a 0.8 application can create needless compiler errors or lead a team to APIs it cannot yet ship.

Release axum-v0.8.9 arrived on 2026-04-14. It added more flexible WebSocket subprotocol selection, corrected a CONNECT routing field, improved the multipart limit error, and raised the minimum Rust version to 1.80. That MSRV change is concrete upgrade work for projects on older toolchains, especially distributions that move Rust slowly. Pinning dependencies will keep an unplanned compiler bump out of a routine build.

August work shows active maintenance across core behavior

GitHub recorded the last push on 2026-08-20 and 75 open issues and pull requests combined. Activity continued through 2026-08-23, including work on an inner-path extractor. August changes also touched shutdown contention, CI, request IDs, Tokio feature selection, server-sent events, and connection lifetime limits. The queue is active in the areas an HTTP library must keep correct.

Axum has reached the point where the difficult decision is architectural, not whether the repository works. Our 19-second install, 26-second build, and 1,280 passing tests support confidence in the measured commit. Choose it when Tower is already part of the platform or when a small typed layer is preferable to framework convention. Choose a fuller framework when the team wants more of those conventions maintained upstream.

Alternatives

ProjectWhat it isPick it when
Actix WebA fast Rust web framework with its own mature application and middleware model.pick this instead when you prefer Actix's established framework conventions and ecosystem over Tower composition.
PoemAn async Rust web framework with an accompanying OpenAPI library.pick this instead when built-in OpenAPI-oriented routing is central to the service.
SalvoA Rust web framework with handlers, middleware, OpenAPI support, and server utilities.pick this instead when you want more framework-owned facilities in one project.

What people are saying

  1. [github-trending] tokio-rs/axum

Sources

  1. Axum README
  2. Axum crate documentation
  3. axum-v0.8.9 release
  4. Axum issues and pull requests

More web reviews

axios · super-productivity · Graphite · fastify · tabler · go-zero · the whole board →