Skip to content

axum

A Rust library for routing HTTP requests and writing request handlers, built on Tokio.

Stars
27.7k
Forks
1.6k
Licence
MIT
Language
Rust
Last update
4 days ago
Type
Library

What it is

axum is a Rust library for building web servers and APIs. You define routes that map URLs to handler functions, and axum handles extracting data from requests and turning return values into responses. The project emphasizes ergonomics and modularity, according to its description. The README provided here is truncated, so this summary relies mainly on the repository description and topics.

  • Define REST-style routes that map URL paths and HTTP methods to Rust functions
  • Build a JSON API server that parses request bodies into typed structs
  • Compose reusable middleware and route groups into a larger service

Great for

  • Rust developers building HTTP APIs or web services
  • Teams already using the Tokio async runtime
  • Developers who want modular, composable request handling

Not ideal for

  • People who are not writing Rust code, since it is a library rather than a ready-made application
  • Beginners new to Rust, who may find its type-driven handler model hard to learn at first
  • Projects needing a full-featured framework with built-in admin, ORM, or templating, since the README excerpt does not show these
Step-by-step guide: how to use axumInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Rust toolchain (cargo)

    Clone the repository

    git clone https://github.com/tokio-rs/axum
  2. 2

    Run it

    • Add axum and tokio as dependencies in your Cargo.toml
    • Write an async handler function and register it on a Router
    • Start a listener with tokio and serve the router
    • Send a request to the running server in a browser or with curl to check the response
  3. 3

    Get the most out of it

    • Use the Tokio ecosystem alongside axum, since it is built on Tokio
    • Explore the examples directory in the repository for working code (verify it exists in the full README)
    • Read the project's documentation on docs.rs for the full API

Downloads

Strengths

  • Described as focused on ergonomics and modularity
  • Actively maintained, with a recent push and a tagged release (axum-v0.8.9)
  • Permissively licensed under MIT and widely starred on GitHub

Trade-offs

  • The README excerpt is truncated, so detailed capabilities and setup steps could not be verified here
  • Requires familiarity with Rust and async programming
  • Release listed without binaries, so it is used as a dependency rather than downloaded

How it compares

ProjectStarsTypeLevelUpdatedBest for
axum (this)27.7kLibraryintermediate4 days agoRust developers building HTTP APIs or web services
warp10.4kLibraryintermediate3 months agoRust developers building HTTP APIs or web servers
kratos26kLibraryintermediate4 days agoGo developers building a set of backend services that talk over HTTP or gRPC
chi23kLibraryintermediate19 days agoGo developers building REST API services
cpp-httplib17kLibrarybeginner6 days agoC++ developers who need a simple embedded HTTP server or client without a large framework
hyper16.4kLibraryadvanced6 days agoRust developers who need fine control over HTTP client or server behavior

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.