← ClaudeAtlas

mir-backend-rust-actixlisted

Make It Right (Actix-web module). Actix-web 4.x + async Rust specific reliability augmentation. Use alongside mir-backend and mir-backend-rust when the target stack is Actix-web — it carries the mechanical footguns that the framework-agnostic tiers deliberately omit: the multi-worker app data trap (state constructed inside the App factory closure yields N independent copies, not one shared instance), web::Data<T> Arc semantics versus web::ThinData, the removed .data() method, worker-local single-threaded actix-rt execution (!Send types allowed, guard-across-await compiles and deadlocks, blocking starves the whole worker), web::block for blocking work, the real default body limits behind JsonConfig and PayloadConfig, Route::wrap ordering that used to silently drop route middleware, and error handling via the ResponseError trait. TRIGGER only when the Rust backend framework is Actix-web — building, reviewing, or debugging an Actix-web handler, middleware, extractor, or App factory. Always loads TOGETHER WITH mi
anantbhandarkar/make-it-right · ★ 15 · API & Backend · score 81
Install: claude install-skill anantbhandarkar/make-it-right
# /mir-backend-rust-actix · Make It Right (Actix-web) Bottom tier of the chain: `mir-backend` (generic gates) → `mir-backend-rust` (Tokio runtime model) → **this** (Actix-web 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 async runtime, cancellation safety, bounded channels, timeouts) live in `mir-backend-rust` — not here.** **Stack assumed:** Actix-web 4.x · actix-rt (Tokio-backed single-threaded workers) · async Rust. **Versions verified 13 Aug 2026:** | Crate | Current | Note | |---|---|---| | `actix-web` | **4.14.1** (2026-08-09) | **MSRV 1.88** since 4.13.0. Still 4.x — there is no Actix-web 5 | | `actix-files` | **0.6.10** (2026-02-06) | 0.6.10 was a security release — see the Security section | | `actix-cors` | 0.7.1 | ships an unsafe preset — see the Security section | | `actix-session` | 0.11.0 | | Actix-web 4 has been stable for years and the 4.x line is where all work lands. If you see `HttpServer::new` returning `App` with `.data(...)`, that is 3.x-era code and will not compile. ## The Actix-web footguns AI walks into most ### 1. The multi-worker App Data trap — the defining Actix footgun `HttpServer::new` accepts a **closure** (the App factory) and calls it **once per worker thread** (default: one worker per CPU core). Any state you **construct inside** the closure is