HTTP routing and request-handling library for Rust that focuses on ergonomics and modularity
HTTP routing and request-handling library for Rust that focuses on ergonomics and modularity
axum is an HTTP routing and request-handling library that focuses on ergonomics and modularity.
More information about this crate can be found in the crate documentation.
tower and tower-http ecosystem of
middleware, services, and utilities.In particular the last point is what sets axum apart from other libraries / frameworks.
axum doesn't have its own middleware system but instead uses
tower::Service. This means axum gets timeouts, tracing, compression,
authorization, and more, for free. It also enables you to share middleware with
applications written using hyper or tonic.
We are currently working towards axum 0.9 so the main branch contains breaking
changes. See the 0.8.x branch for what's released to crates.io.
…
You can find this example as well as other example projects in the example directory.
See the crate documentation for way more examples.
axum is a relatively thin layer on top of hyper and adds very little
overhead. So axum's performance is comparable to hyper. You can find
benchmarks here and
here.
This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in
100% safe Rust.
axum's MSRV is 1.80.
The examples folder contains various examples of how to use axum. The
docs also provide lots of code snippets and examples.
In the axum's repo we also have a number of examples showing how
to put everything together. You're also welcome to ask in the Discord channel or open a discussion with your question.
🎈 Thanks for your help improving the project! We are so happy to have
you! We have a contributing guide to help you get involved in the
axum project.
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in axum by you, shall be licensed as MIT, without any
additional terms or conditions.