axum

Structure Axum 0.8+ web APIs with domain-based routing and middleware.

Updated Jun 15, 2025
One-click install
npx skills add https://github.com/patrickhaahr/dotfiles --skill axum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axum
Source: https://github.com/patrickhaahr/dotfiles/tree/main/opencode/.config/opencode/skills/axum
Command: npx skills add https://github.com/patrickhaahr/dotfiles --skill axum

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the challenge of building production-ready web APIs using Axum 0.8+ in Rust.

Core Features & Use Cases

  • Domain-based routing: Organize routes by domain modules to keep handlers cohesive and extensible.
  • Middleware & observability: Leverage Tower and Tower HTTP layers for tracing, timeouts, CORS, and request IDs to improve reliability and debuggability.
  • Production-grade patterns: Centralized error handling, state management, and graceful shutdown for robust services.

Quick Start

Initialize a Rust project, add Axum, and expose a basic /health endpoint to validate the setup.

Frequently Asked Questions about axum

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a production-ready web API in Rust using Axum?

Build production-ready web APIs in Rust using Axum 0.8+ by applying domain-based routing, centralized error handling, state management, and Tower middleware integration for reliable backend services.

What is the best way to organize Axum routes for a growing backend service?

Organize Axum routes by domain modules to keep handlers cohesive and extensible, ensuring your backend web API remains maintainable as the application scales across different service boundaries.

How does Axum integrate with Tower middleware for tracing and CORS?

Axum integrates with Tower and Tower HTTP layers to add middleware for tracing, timeouts, CORS, and request IDs, improving web API reliability and observability across backend services.

Can I implement centralized error handling and state management in Axum 0.8?

Yes, you can implement centralized error handling and state management in Axum 0.8+ using production-grade patterns that ensure robust backend services and consistent web API responses.

Does Axum support graceful shutdown for backend web APIs?

Axum supports graceful shutdown as part of its production-grade patterns, allowing backend web APIs to terminate reliably without dropping active requests during deployments.

What do I need to start building an Axum web API in Rust?

Initialize a Rust project, add the Axum 0.8+ crate as a dependency, and expose a basic /health endpoint to validate your backend web API setup before expanding routing and middleware.