axum

Ergonomic and modular HTTP routing and request-handling framework for Rust, built on Tokio, Hyper, and Tower.

Framework
Cargo
v0.8.9
27,581 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 96
Maintenance 100
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
91 /100 Excellent
Architecture 92
Code Quality 90
Innovation 92
Learning Curve 85

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 Router API for declaratively mapping paths and HTTP methods to async handler functions
  • A rich extractor system (Json, Path, Query, State, Form, Multipart, and custom FromRequest types) 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 34 apps in this directory

Rust
68%
Other

GitButler

AI Development · Developer Tools · Devops

21,841

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
66
Dependency
Built with
Rust 68%
TypeScript 20%
Updated 5 days ago
Rust
37%
Other

Hook0

Devops

1,504

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.

View details
84
Repo Health
82
Technical
69
Dependency
Built with
Rust 37%
TypeScript 12%
Updated 6 days ago
Go
69%
MIT

hoop

Monitoring · Security

836

A wire-protocol gateway that enforces data masking, command blocking, approval workflows, and full session recording for engineers and AI agents accessing production infrastructure.

View details
86
Repo Health
80
Technical
64
Dependency
Built with
Go 69%
Clojure 13%
Updated 5 days ago
TypeScript
68%
MIT

Hoppscotch

Developer Tools

80,676

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
91
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 68%
Vue 24%
Updated 6 days ago
TypeScript
68%
MIT

Hoppscotch

Developer Tools

80,676

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
91
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 68%
Vue 24%
Updated 6 days ago
Rust
72%
Other

iii

Developer Tools · Devops

18,854

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 72%
TypeScript 16%
Updated 6 days ago
Dart
79%
Apache 2.0

LocalSend

Networking

95,370

An open-source, cross-platform AirDrop alternative that sends files and messages device-to-device over your local network with no internet, no account, and no cloud server involved.

View details
88
Repo Health
61
Technical
78
Dependency
Built with
Dart 79%
Rust 17%
Updated 1 weeks ago
Rust
86%
Apache 2.0

mesh-llm

AI Agents · AI Development

3,551

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
85
Repo Health
91
Technical
69
Dependency
Built with
Rust 86%
TypeScript 10%
Updated 5 days ago
Rust
93%
Apache 2.0

Murr

Databases

117

A RocksDB-based NVMe/S3 cache purpose-built for AI inference workloads — a faster Redis replacement optimized for batch, low-latency, zero-copy reads and writes between data pipelines and inference apps.

View details
73
Repo Health
72
Technical
75
Dependency
Built with
Rust 93%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers