Building and Maintaining Rust at Scale
summary
Advocates concrete rules: split a million‑line codebase into crates so core compiles first and others compile in parallel, shaving wall‑clock build time; replace Arc<Mutex<bool>> with AtomicBool (8 bytes vs 1) for obvious cost savings; enforce lints with Clippy and editor checks via Rust Analyzer; run cargo LLVM cov for coverage, use quickcheck for property testing and MIRI for undefined behavior, cargo deny for security, Criterion and FlameGraph for performance, and prefer wrapper structs around enums to preserve API stability.
AI-written summary · about
chapters (26)
- 0:00Idiomatic Rust code
- 1:55Project structure
- 3:23Platform-specific code
- 4:48Workspaces for multi-crate
- 6:56Rust Analyzer config
- 8:42Clippy for code quality
- 10:05Iterators and patterns
- 11:31Error handling with Result
- 12:54Traits and dynamic dispatch
- 14:18Extension traits
- 15:19Newtype pattern
- 16:02Wrapper structs for deserialization
- 17:05Enums in structs for API
- 19:32Non-exhaustive for compatibility
- 20:14Builder pattern
- 21:35Default field values
- 22:19String concatenation
- 23:41Evolving Rust idioms
- 24:22Error handling with anyhow
- 26:27Unit and integration tests
- 27:10Property testing with QuickCheck
- 27:50Testing unsafe code with Miri
- 28:32Code coverage tracking
- 28:53Maintaining dependencies and documentation
- 30:18Tools for large codebases
- 31:23Q&A








