axum
Installation
SKILL.md
Axum
Axum is an ergonomic, modular web application framework built on Tokio, Tower, and Hyper for high-throughput, type-safe asynchronous Rust services.
When to Use
- Modern Asynchronous Rust Web Services: Building RESTful APIs and microservices directly within the Tokio ecosystem.
- Tower Middleware Integration: Leveraging Tower's rich ecosystem of rate-limiting, timeouts, retries, and tracing.
- Modular Type-Safe Route Handlers: Combining extractors, route routers, and shared state seamlessly.
- High-Performance WebSockets & SSE: Real-time event streaming and live pub/sub endpoints in Rust.
Quick Start
use axum::{routing::get, Json, Router};
use serde::Serialize;
use std::net::SocketAddr;