Strategies to speed up build iteration, or dynamic hot reloading
summary
Practical checklist of what actually speeds Rust iteration: swap the linker to LLD or experimental mold/wild, try Cranelift for faster codegen, add sccache or a shared target dir to reuse artifacts, and measure with hyperfine, cargo build --timings and cargo-llvm-lines. Replace heavy build scripts/proc-macros or pre-generate checked data, prefer dynamic dispatch or feature-gated code to avoid monomorphization blowups, run cargo-next-test and bacon file watchers for instant loops, and explore hot-reload via libloading/Subsecond or safe WASM plugins; a simple strings cleanup once gave ~5% speedup.
AI-written summary · about
chapters (31)
- 0:00Rust build iteration speed
- 1:12Rust compilation slowness
- 3:39Measuring Rust build performance
- 5:44Rust compiler improvements
- 6:06Cargo profiles for faster builds
- 7:10Faster Rust toolchain components
- 8:12Incremental compilation in Rust
- 9:57Shared compilation caches with sccache
- 11:00Debugging Rust rebuilds
- 11:44rust-analyzer parallel builds
- 12:05Bazel for Rust builds
- 12:48CI pipelines for Rust
- 13:52OS optimizations for Rust builds
- 14:34Speeding up tests and integration tests
- 15:57Reducing example rebuilds
- 16:38Workspace parallel compilation
- 17:18Dynamic linking in Rust
- 18:21Automated builds with watchers
- 19:04Cleaning Rust dependencies
- 20:05Features to reduce compilation
- 22:08Macros impact on compile time
- 23:53Procedural macros side effects
- 24:35Faster build scripts
- 25:37Static vs dynamic dispatch
- 27:21Reducing generics overhead
- 28:24Moving logic outside Rust
- 30:09Hot reloading Rust with dynamic libs
- 31:31Hot reloading with WASM
- 32:36Subsecond hot patching
- 34:03Trade-offs for build speed
- 36:09Q&A
related talks
31mImproving Your Rust Life
32mBuilding and Maintaining Rust at Scale
05mTips for Speeding Up Cargo Build in CI
56mReady for Rust
25mLessons Learned From the Rust Ecosystem That Can Be Adopted Elsewhere
31mBenchmarking and Optimization of Rust Libraries
26mHow Rust Compiles - Noratrieb
23m"The Current State and Future of Rust Compiler Performance"
