mir-backend-rust-actixlisted
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