CodeVetter · Repo Unpack · System map
tokio-rs/axum
The repository is a library ecosystem with application examples, rather than one deployable service. The root workspace divides foundational contracts, HTTP execution, optional utilities, and procedural macros across four crates. Example binaries assemble their own listeners, application state, middleware, and external integrations in a separate workspace. Build and release behavior is described by Cargo manifests and GitHub Actions.
- The root workspace includes axum and axum-* members, uses resolver 2, declares Rust 1.80, and forbids unsafe code through workspace lints.
- axum-core exposes body, extract, response, RequestExt, and RequestPartsExt; its crate documentation recommends it for libraries implementing FromRequest or IntoResponse.
- axum explicitly targets Tokio and Hyper; runtime and transport independence are not stated goals, while Tower Service supplies its middleware integration.
- Router stores an Arc<RouterInner<S>> containing a PathRouter and catch-all fallback; PathRouter stores endpoints in a vector indexed by RouteId and matches paths through matchit.
- axum-extra gates utilities behind Cargo features, while axum-macros is a proc-macro crate built with syn, quote, and proc-macro2.
- examples/Cargo.toml defines a separate workspace; example binaries bind listeners and pass application routers to axum::serve, with database and session ownership established inside those binaries.
- CI specifies locked workspace tests and all-target, all-feature Clippy checks for both workspaces, plus formatting, documentation, feature, MSRV, ARM, and selected WASM checks.
- Release-plz runs on main and v0.8.x for the tokio-rs owner; configuration disables release-on-every-commit behavior and automatic changelog updates, while README warns that main contains forthcoming 0.9 breaking changes.