← ClaudeAtlas

mir-backend-rustlisted

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
anantbhandarkar/make-it-right · ★ 15 · AI & Automation · score 81
Install: claude install-skill anantbhandarkar/make-it-right
# /mir-backend-rust · Make It Right (Rust runtime) The middle tier. `mir-backend` decides **what is correct** (any language). The framework module (e.g. `mir-backend-rust-axum`) knows the **library's mechanics**. This tier owns what is true for **all Rust async backends because they run on Tokio** — the concurrency model and ownership rules that Axum, Actix-web, Warp, and Poem all inherit. **Runtime assumed:** async Rust on Tokio (current-thread or multi-thread scheduler). The notes hold for any Tokio-based framework. Load order: `mir-backend` → `mir-backend-rust` → `<framework module>`. **Versions verified 13 Aug 2026** — state these, don't guess: | Thing | Current | Note | |---|---|---| | Rust stable | 1.97.1 (1.97.0 released 2026-07-09) | 1.97 made v0 symbol mangling the default and added Cargo's `build.warnings` (`allow`/`warn`/`deny`), replacing `RUSTFLAGS=-Dwarnings` in CI | | Rust edition | 2024 (stabilized in 1.85) | `edition = "2024"` in `Cargo.toml`. There is no 2027 edition yet | | Tokio | 1.53.1 | Still 1.x. **There is no Tokio 2.0** — anything claiming a 2.x API is wrong | Pin the MSRV in `Cargo.toml` with `rust-version = "..."`. Framework MSRVs already exceed some CI images: actix-web 4.13+ needs 1.88, sqlx 0.9 needs 1.94, axum 0.8.9 needs 1.80. ## The Tokio async Rust footguns AI walks into (framework-agnostic) ### 1. DON'T BLOCK THE ASYNC RUNTIME Tokio runs async tasks on a fixed pool of worker threads (by default, one per CPU core). A blocking call on