Compile the release artifact for shipping.
Section: Release recipes
Build an optimized release binary
bash
bash
cargo build --releaseExplanation
The default production build path for many CLI apps.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Release recipes
Read current package version
Inspect the manifest version before tagging a release.
Clean before a release build
Rebuild from a clean state for reproducibility.