# tokio-rs/axum

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tokio-rs-axum).**

25,028 stars · 1,350 forks · Rust · mit

## Links

- GitHub: https://github.com/tokio-rs/axum
- awesome-repositories: https://awesome-repositories.com/repository/tokio-rs-axum.md

## Topics

`http` `routing` `rust`

## Description

Axum is a web framework for the Rust programming language designed for building scalable and high-performance backend services. It provides a modular, asynchronous programming model that centers on a declarative routing engine, allowing developers to map HTTP requests to handler functions using a type-safe API.

The framework distinguishes itself through a robust request extraction system that leverages trait-based reflection to automatically parse and validate incoming data into strongly typed function arguments. By utilizing a standardized service abstraction, it enables the composition of modular middleware and request handlers into a unified processing pipeline, ensuring that cross-cutting concerns like authentication and tracing are handled consistently.

Beyond its core routing and extraction capabilities, the framework supports the development of structured web interfaces by automating the conversion of function return values into standard HTTP responses. It also provides a centralized model for error handling, ensuring that internal application failures are translated into predictable status codes and responses for reliable client communication.

## Tags

### Web Development

- [Routing and Request Handling](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/routing-request-handling.md) — Defines application endpoints and request handling logic using a clean, type-safe API.
- [High-Performance Web Services](https://awesome-repositories.com/f/web-development/high-performance-web-services.md) — Provides a high-performance, asynchronous framework for building scalable backend services in Rust.
- [Request Routing](https://awesome-repositories.com/f/web-development/request-routing.md) — Directs incoming web requests to specific handler functions using a declarative interface. ([source](https://github.com/tokio-rs/axum#readme))
- [Type-Safe Routing](https://awesome-repositories.com/f/web-development/type-safe-routing.md) — Organizes application endpoints into a nested, type-safe structure for mapping requests to handlers.
- [Type-Safe Web Frameworks](https://awesome-repositories.com/f/web-development/type-safe-web-frameworks.md) — A modular, type-safe, and asynchronous web framework designed for building high-performance backend services in Rust.
- [Route Handlers](https://awesome-repositories.com/f/web-development/route-handlers.md) — Features a declarative routing engine that maps HTTP requests to handler functions using a type-safe API.
- [HTTP Request Handlers](https://awesome-repositories.com/f/web-development/http-request-handlers.md) — Builds HTTP request handlers by automatically generating code for parameter extraction and response conversion. ([source](https://github.com/tokio-rs/axum/tree/main/axum-macros))
- [Middleware Integration Layers](https://awesome-repositories.com/f/web-development/middleware-integration-layers.md) — Enables the composition of modular middleware and handlers into a unified, consistent request processing pipeline.
- [RESTful API Development](https://awesome-repositories.com/f/web-development/restful-api-development.md) — Facilitates the development of structured RESTful APIs by mapping HTTP requests to typed handlers and automating response conversion.
- [API Response Handlers](https://awesome-repositories.com/f/web-development/api-response-handlers.md) — Constructs web responses by automatically converting return values into standard formats. ([source](https://github.com/tokio-rs/axum/tree/main/axum))
- [Error Handling](https://awesome-repositories.com/f/web-development/error-handling.md) — Provides a centralized model for translating internal application failures into predictable HTTP status codes and responses.
- [Error Response Mappers](https://awesome-repositories.com/f/web-development/error-response-mappers.md) — Maps internal failures to specific status codes and response bodies for predictable error handling. ([source](https://github.com/tokio-rs/axum/tree/main/axum))
- [HTTP Response Builders](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-utilities/http-response-builders.md) — Provides utilities for constructing and formatting HTTP responses from function return values.
- [Request Body Validations](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/request-body-validations.md) — Validates and converts incoming request data into typed structures using a declarative approach. ([source](https://github.com/tokio-rs/axum/tree/main/axum))

### Data & Databases

- [Type-Safe Request Binders](https://awesome-repositories.com/f/data-databases/object-relational-mappers/data-validation-layers/type-safe-request-binders.md) — Automatically parses and validates incoming HTTP request data into strongly typed function arguments using trait-based reflection.
- [Typed Data Extraction](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/data-parsing-extraction/typed-data-extraction.md) — Extracts and validates incoming data into typed structures using a declarative system. ([source](https://github.com/tokio-rs/axum#readme))

### Software Engineering & Architecture

- [Handler Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/handler-abstractions.md) — Uses a standardized asynchronous trait to compose modular middleware and request handlers into a unified pipeline.
- [Request Middleware](https://awesome-repositories.com/f/software-engineering-architecture/request-middleware.md) — Applies reusable middleware components to handle cross-cutting concerns via a standard service abstraction. ([source](https://github.com/tokio-rs/axum/tree/main/axum))
- [Application Error Handlers](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/error-management/application-error-handlers.md) — Translates internal application failures into predictable status codes and responses. ([source](https://github.com/tokio-rs/axum#readme))
- [Third-Party Service Connectors](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/third-party-service-connectors.md) — Connects third-party service layers to handle cross-cutting concerns like authentication and tracing. ([source](https://github.com/tokio-rs/axum#readme))

### Networking & Communication

- [Asynchronous Request Handlers](https://awesome-repositories.com/f/networking-communication/asynchronous-request-handlers.md) — Executes request processing using non-blocking primitives to handle high-concurrency network I/O.
- [Request Handlers](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/request-processing-architectures/request-processing/request-handlers.md) — Links incoming requests to specific functions using a simple interface for defining endpoints. ([source](https://github.com/tokio-rs/axum/tree/main/axum))
- [Service Abstractions](https://awesome-repositories.com/f/networking-communication/http-request-abstractions/service-abstractions.md) — Uses a standardized service trait to compose modular middleware and handlers into scalable web applications.

### Programming Languages & Runtimes

- [Traits](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/type-systems/trait-based-polymorphism/traits.md) — Leverages compile-time trait resolution to automatically parse and validate incoming HTTP request data.
