Registry / web-framework / axum
library0.8.9rscratesunverified

HTTP routing and request handling library that focuses on ergonomics and modularity.

# Cargo.toml [dependencies] axum = "0.8.9"
INSTALL
IMPORT
SIG · AXUM
A
axum
web-frameworkrustv0.8.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Router
use axum::Router;

Create a simple HTTP server with Axum.

use axum::{Router, routing::get}; async fn hello() -> &'static str { "Hello, World!" } #[tokio::main] async fn main() { let app = Router::new().route("/", get(hello)); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); axum::serve(listener, app).await.unwrap(); }
Debug
Known issues
gotchaRequires Tokio runtime (not async-std compatible)
fix
Add tokio as a dependency with the "full" feature and use #[tokio::main]
affects: >=0.1.0
Upgrade
Version history
0.8.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
52 hits · last 30 days
node
46
OpenAI (training)
1
Resources
axum — cargo add axum · libregistry