axum
Ergonomic and modular HTTP routing and request-handling framework for Rust, built on Tokio, Hyper, and Tower.
Repository Health
Technical Analysis
Axum is a web application framework for Rust that focuses on ergonomics and modularity. It routes requests to handlers with a macro-free API, parses requests declaratively through extractors, and produces responses with minimal boilerplate, giving you a predictable model for building HTTP services and JSON APIs.
Rather than shipping its own middleware system, axum builds directly on tower::Service, so it inherits the entire Tower and tower-http ecosystem — timeouts, tracing, compression, authorization, and more — for free. Because it is a thin layer over Hyper, it adds very little overhead while remaining interoperable with any application built on hyper or tonic.
What You Get
- A macro-free
RouterAPI for declaratively mapping paths and HTTP methods to async handler functions - A rich extractor system (
Json,Path,Query,State,Form,Multipart, and customFromRequesttypes) for typed, declarative request parsing - First-class access to the Tower and tower-http middleware ecosystem — tracing, compression, CORS, timeouts, authorization, and more
- Built-in helpers for WebSockets, multipart forms, typed state sharing, and graceful shutdown
- 100% safe Rust (
#![forbid(unsafe_code)]) with a thin, low-overhead layer over Hyper
Common Use Cases
- Building JSON REST APIs and backend services for web and mobile clients
- Serving real-time features over WebSockets alongside conventional HTTP routes
- Composing microservices that share Tower middleware with hyper- or tonic-based systems
- Standing up internal tools, proxies, and metrics endpoints with minimal boilerplate
Under The Hood
Architecture
Axum layers a small routing and handler-dispatch surface over Hyper and Tower. The public entry point is Router (in src/routing/mod.rs), which combines a path_router built on the matchit radix-tree matcher with per-path method_routing to dispatch requests. Handlers become services through the Handler trait (src/handler/), which uses a set of tuple implementations so functions with up to sixteen extractor arguments implement the trait automatically. Request data is pulled out declaratively by extractors implementing FromRequest/FromRequestParts (src/extract/), and results are turned into responses via IntoResponse. Everything terminates in a tower_service::Service, and axum::serve (src/serve/) drives the whole stack over a hyper-util connection using a Tokio TcpListener.
Tech Stack
Written in Rust (edition 2021, MSRV 1.80) with a Cargo workspace splitting the crate into axum, axum-core, axum-extra, and axum-macros. Core dependencies are hyper (HTTP implementation), tower/tower-layer/tower-service (middleware), http/http-body, bytes, matchit (route matching), and serde/serde_json for JSON. Optional cargo features (json, ws, multipart, macros, http2, tracing, and others) keep the compiled surface minimal, and tokio provides the async runtime.
Code Quality
The crate uses #![forbid(unsafe_code)] to guarantee 100% safe Rust and carries an extensive test suite — dozens of dedicated test modules across routing, extractors, and middleware. Code is organized into small, focused modules with clear naming, strongly typed public APIs, and a predictable, documented error-handling model. Development is very active (443 contributors, hundreds of releases) and releases follow a disciplined workspace-versioning scheme.
API Design
Axum’s public API is its headline strength: a macro-free, composable builder (Router::new().route(...)) reads naturally, extractors make request parsing declarative and type-checked, and IntoResponse removes response boilerplate. Documentation is thorough — a heavily annotated crate doc plus a large examples/ directory (hello-world, JWT, WebSockets, database integrations, graceful shutdown, and more) — so a working server takes only a handful of lines to stand up.
Used by 24 apps in this directory
Cameleer
AI Agents
A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.
Cap
Team Chat · Video Conferencing
Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.
claw-code
AI Agents · AI Code Assistants
A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.
cmux
Developer Tools · AI Development
A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.
Cryptgeon
File Storage · Security
Self-destructing encrypted notes and files that vanish after viewing — the server never sees your keys.
CubeSandbox
Developer Tools · Security · AI Agents
Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.
FastGPT
AI Agents · AI Development
Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.
GitButler
Developer Tools · Devops · AI Development
Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.
Hook0
Devops
Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.