type: architecture
status: active
timestamp: 2026-06-24
tags: [rust, stack, frameworks, libraries, tooling]
status: active
timestamp: 2026-06-24
tags: [rust, stack, frameworks, libraries, tooling]
Rust Minimalist & Modern Stack
Minimalist stack for Rust
Rust Modern Stack
- Runtime Environment: Rust Edition 2021
- Chosen over older editions (like 2018) for modern language features, including disjoint capture in closures, panic macro changes, cargo feature resolver v2, and an updated prelude.
- Package Manager: cargo
- Chosen over external tools as it is the official, zero-config, highly-optimized compiler driver, package manager, and dependency orchestrator for the Rust language.
- Linter & Formatter: clippy & rustfmt
- Chosen over manual style guides or third-party formatters because they are officially maintained, run out-of-the-box, compile directly with the language, and catch over 700 types of common code smells and performance bugs.
- Test Runner: cargo-nextest
- Chosen over standard
cargo testbecause it executes tests using a process-per-test model, eliminating execution bottlenecks by scheduling tests across all available CPU cores, providing up to 3x faster execution, strict test isolation (so aborts/segmentation faults in one test don’t fail the entire run), and robust retry-on-failure configuration.
- Chosen over standard
- Web Framework: Axum
- Chosen over Actix-web and Rocket because of its native, seamless integration with
tokioand thetowermiddleware ecosystem. It uses standard async functions and type-safe extractors rather than Actix-web’s specialized/actor-based runtimes or Rocket’s heavy macros and slower compilation times.
- Chosen over Actix-web and Rocket because of its native, seamless integration with
- Asynchronous Runtime: tokio
- Chosen over async-std or smol because it is the industry-standard runtime, battle-tested at scale, with an extensive ecosystem, highly-optimized I/O loop, and native integration with Axum and SQLx.
- Serialization/Deserialization: serde
- Chosen over custom parsing because it provides zero-copy compile-time serialization and deserialization, supporting JSON, YAML, TOML, and binary formats with zero runtime overhead.
- Database Client: SQLx
- Chosen over Diesel because it is a SQL-first, compile-time checked SQL toolkit that runs natively async. It allows developers to write raw SQL while macros verify query correctness against a database at compile time, avoiding the heavy compile-time type-generation and block-on-thread model of Diesel.