Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

axum

> 编程语言
Open source

HTTP routing and request-handling library for Rust that focuses on ergonomics and modularity

26.8K stars0 likes1 views
WebsiteGitHub

About

HTTP routing and request-handling library for Rust that focuses on ergonomics and modularity

axum

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.

High level features

  • Route requests to handlers with a macro free API.
  • Declaratively parse requests using extractors.
  • Simple and predictable error handling model.
  • Generate responses with minimal boilerplate.
  • Take full advantage of the 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.

⚠ Breaking changes ⚠

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.

Usage example

…

You can find this example as well as other example projects in the example directory.

See the crate documentation for way more examples.

Performance

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.

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% safe Rust.

Minimum supported Rust version

axum's MSRV is 1.80.

Examples

The examples folder contains various examples of how to use axum. The docs also provide lots of code snippets and examples.

Getting Help

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.

Contributing

🎈 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.

License

This project is licensed under the MIT license.

Contribution

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.

Issues· 78 open

View all issuesOpen on GitHub
  • #3904

    InnerPath fails on invalid UTF-8 captured by an outer router

    Updated Sep 26, 2026
  • #2492

    `RequestBodyLimitLayer` when applied via `ServiceBuilder` won't compile in v0.7

    Updated Sep 14, 2026
  • #2659

    Consider changing the behavior of / route when nesting

    C-musingsE-hardbreaking changeA-axumUpdated Sep 7, 2026
  • #2678

    Routing percent-encoded paths

    C-musingsA-axumUpdated Sep 7, 2026
  • #3621

    Path extractor Vec<String> deserialization support for wildcard paths

    Updated Sep 7, 2026
  • #3017

    Make UrlParams public

    Updated Sep 7, 2026
  • #3880

    Add extractors for inner variants of `MatchedPath` and `RawPathParams`

    Updated Sep 7, 2026
  • #3846

    Replace the `cookie` crate for ease of use

    Updated Jul 26, 2026
  • #3832

    Ideas for a more powerful `FromRequest(Parts)` derive

    Updated Jul 12, 2026
  • #3814

    Byte range requests in File stream do not support all features defined by RFC.

    C-enhancementbreaking changeA-axum-extraUpdated Jul 6, 2026

> Tags

Rusthttproutingrust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言