Problem / Solution Reference
Quick map from recurring problems to idiomatic Rust solutions and deeper articles.
Search across all documentation pages
Quick map from recurring problems to idiomatic Rust solutions and deeper articles.
| Problem | Idiomatic solution |
|---|---|
| Parse CLI args | clap 4 derive |
| HTTP API | Axum 0.8 + tower |
| DB access | sqlx 0.8 with pool |
| JSON | serde 1.0 |
| Async runtime | Tokio 1.x |
When to reach for this: "How do I X in Rust?" during design or code review.
| Problem | Solution | Article |
|---|---|---|
| Borrow checker fight | restructure, Arc, lifetimes | Fighting the Borrow Checker |
| Shared read-only data | Arc<T> | Rc and Arc |
| Interior mutability | RefCell / Mutex | Interior Mutability |
| Problem | Solution | Article |
|---|---|---|
| Blocking in async | spawn_blocking | 30 Async Rules |
| HTTP client | reqwest + shared client | HTTP Clients |
| Timeouts | tokio::time::timeout | Retries & Timeouts |
| Problem | Solution | Article |
|---|---|---|
| Tabular analytics | Polars 0.46+ lazy | Polars |
| Too many clones | borrow/Cow | Avoiding Clones |
| Slow release binary | LTO, features trim | Release Tuning |
Add team-specific rows to internal wiki: auth (JWT crate), config (config + serde), observability (tracing + OpenTelemetry).
OnceLock or injected state.| Alternative | Use When | Don't Use When |
|---|---|---|
| This reference | Quick routing | Deep learning substitute |
| ADR | Significant fork | Every small choice |
| AI search | Exploration | Sole authority |
Add rows in PR when same question asked thrice in team chat.
sqlx for control; SeaORM/Diesel per team preference - link database articles.
clap 4 derive + anyhow in main.
nextest + tokio test + sqlx test fixtures.
JWT/oauth articles in api-auth-security section.
tracing structured JSON; tracing-subscriber env filter.
metrics crate + Prometheus scrape endpoint.
Minimal Docker + cargo build --release static or distroless.
bindgen/cbindgen articles in systems-ffi.
wasm-bindgen + wasm-pack flow in webassembly section.
Stack versions: This page was written for Rust 1.97.0 (edition 2024), Tokio 1.x, Axum 0.8, serde 1.0, sqlx 0.8, clap 4, and Polars 0.46+.
Reviewed by Chris St. John·Last updated Jul 16, 2026