mir-backend-rust-axum

Solid

Make It Right (Axum module). Axum 0.8 + Tower + async Rust specific reliability augmentation. Use alongside mir-backend and mir-backend-rust when the target stack is Axum — it carries the mechanical footguns that the framework-agnostic tiers deliberately omit: the 0.8 route syntax change (/:id now panics, use /{id}), extractor ordering (body-consuming extractors must be last), custom extractors after the #[async_trait] removal in axum-core 0.5, typed State<T> vs Extension<T> and the FromRef sub-state pattern, implementing IntoResponse for error types without leaking internals, DefaultBodyLimit, and Tower middleware layer ordering (outermost wraps first). TRIGGER only when the Rust backend framework is Axum — building, reviewing, or debugging an Axum handler, router, extractor, or Tower middleware. Always loads TOGETHER WITH mir-backend (the gates) and mir-backend-rust (Tokio runtime concerns: blocking, guard-across-await, cancellation safety, async traits, Arc/'static, backpressure, timeouts); this module onl

API & Backend 15 stars 0 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
40
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /mir-backend-rust-axum · Make It Right (Axum) Bottom tier of the chain: `mir-backend` (generic gates) → `mir-backend-rust` (Tokio runtime model) → **this** (Axum/Tower library mechanics). Run the gates first; load the Rust runtime tier for blocking/cancellation/Arc concerns; reach for *this* at Gate 5 (design mechanics), Gate 6 (implementation), and Gate 7 review. **Runtime-level concerns (blocking the Tokio runtime, guard-across-await, cancellation safety, bounded channels, timeouts) live in `mir-backend-rust` — not here.** **Stack assumed:** Axum · Tower middleware · async Rust on Tokio. **Versions verified 13 Aug 2026:** | Crate | Current | Note | |---|---|---| | `axum` | **0.8.9** (2026-04-14) | MSRV 1.80. 0.8.0 shipped 2025-01-01 | | `axum-core` | 0.5.6 | where the `#[async_trait]` removal landed | | `tower` | 0.5.3 | | | `tower-http` | **0.7.0** (2026-06-15) | breaking changes from 0.6 — see §5 | **Axum 0.9 is not released.** Work is on `main` with breaking changes queued, and the maintainers have stated there is no timeline. Target 0.8.x. If you are reading a tutorial that shows `Router::new().route("/users/:id", ...)`, it predates 0.8 and will panic — see §1. ## The Axum footguns AI walks into most ### 1. Route syntax changed in 0.8 — `/:id` panics, write `/{id}` The single most common failure when AI writes Axum today. Axum 0.8 upgraded `matchit` to 0.8, which changed path parameter syntax. The old form was **deliberately made a panic** rather than silently...

Details

Author
anantbhandarkar
Repository
anantbhandarkar/make-it-right
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

mir-backend-rust

Make It Right (Rust runtime tier). Async Rust on Tokio runtime reliability footguns that are shared across EVERY Rust backend framework (Axum, Actix-web, Warp, Poem) — distinct from the generic backend gates and from any one framework's mechanics. Covers: blocking the async runtime (std::thread::sleep / blocking I/O inside async tasks starves Tokio worker threads), holding a std::sync::MutexGuard across an .await point (Send error on a multi-thread runtime, silent deadlock on a current-thread one), cancellation safety (futures dropped at any .await under timeout/select!/disconnect leaving partial state), panic-poisoned Mutexes, Arc-based shared state with 'static bounds on spawned tasks, async fn in traits and the still-unsolved Send-bound problem, spawn_blocking thread-pool exhaustion, bounded vs unbounded channels for backpressure, and timeout discipline on every outbound call. TRIGGER when the backend runtime is Rust — sits between mir-backend (generic) and the framework module. SKIP for Python/Node/JVM/Go

15 Updated 1 weeks ago
anantbhandarkar
Web & Frontend Listed

rc-axum

Implements and reviews Axum 0.8+ APIs in Rust — routing, State, extractors, Tower middleware, typed errors, WebSockets, CORS, timeouts, and production hardening. Use when building or changing Axum backends, handlers, middleware, or real-time WS endpoints. Do not use for SvelteKit/frontends (rc-sveltekit), SQLx/Postgres data layer alone (rc-sqlx), Rust language idioms — ownership, error types, trait design (rc-rust) — or general React/Next work.

19 Updated 1 months ago
rodolfochicone
AI & Automation Listed

axum

Axum Rust web framework by Tokio. Covers routing, handlers, extractors, middleware, and state. Use for ergonomic async Rust APIs. USE WHEN: user mentions "axum", "tokio web", "rust async api", "tower middleware", asks about "axum extractors", "axum state", "axum router", "rust websocket axum", "hyper server", "ergonomic rust api" DO NOT USE FOR: Actix-web projects - use `actix-web` instead, Rocket projects - use `rocket` instead, Warp projects - use `warp` instead, non-Rust backends

33 Updated today
claude-dev-suite