Crate features / axum
Feature flags · axum 0.8.9 · from crates.io 2026-10-24
axum features: what each one does, and the line to copy
Short answeraxum 0.8.9 has 15 features. By default it turns on form, http1, json, matched-path, original-uri, query, tokio, tower-log, tracing; add default-features = false to start from nothing. It needs Rust 1.80 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
__private | tokio, http1, dep:reqwest | |
__private_docs | axum-core/__private_docs, tower/full, dep:serde, dep:tower-http | |
form | yes | dep:form_urlencoded, dep:serde_urlencoded, dep:serde_path_to_error |
http1 | yes | dep:hyper, hyper?/http1, hyper-util?/http1 |
http2 | dep:hyper, hyper?/http2, hyper-util?/http2 | |
json | yes | dep:serde_json, dep:serde_path_to_error |
macros | dep:axum-macros | |
matched-path | yes | nothing else (a switch the code checks) |
multipart | dep:multer | |
original-uri | yes | nothing else (a switch the code checks) |
query | yes | dep:form_urlencoded, dep:serde_urlencoded, dep:serde_path_to_error |
tokio | yes | dep:hyper-util, dep:tokio, tokio/net, tokio/rt, tower/make, tokio/macros |
tower-log | yes | tower/log |
tracing | yes | dep:tracing, axum-core/tracing |
ws | dep:hyper, tokio, dep:tokio-tungstenite, dep:sha1, dep:base64 |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version axum declares (rust-version), and the release that changed it:
- 0.6.0-rc.1 (2022-08-23): Rust 1.60
- 0.5.16 (2022-09-10): no rust-version declared
- 0.6.0-rc.2 (2022-09-11): Rust 1.60
- 0.5.17 (2022-10-20): no rust-version declared
- 0.6.0-rc.4 (2022-11-09): Rust 1.60
- 0.6.19 (2023-07-17): Rust 1.63
- 0.7.0 (2023-11-27): Rust 1.66
- 0.8.0-alpha.1 (2024-10-05): Rust 1.75
- 0.7.8 (2024-11-15): Rust 1.66
- 0.8.0-rc.1 (2024-12-17): Rust 1.75
- 0.8.5 (2025-09-28): Rust 1.78
- 0.8.9 (2026-04-14): Rust 1.80
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p axum --precise <version>, or use resolver 3, which picks compatible versions for you.
More on axum
Real downloads, dependents and alternatives: axum crate data (1.6M real downloads a day, 9,968 dependents).
docs.rs feature list · crates.io · license MIT · edition 2021
Up next
Before you depend on itaxum crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?