Build the package as it would be published.
Section: Local packaging
Create a package tarball
bash
bash
cargo packageExplanation
Validates and assembles the publishable package locally.
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 Local packaging
Validate publish without uploading
Run all publish checks without actually publishing.
Clean before a release build
Rebuild from a clean state for reproducibility.
Build an optimized release binary
Compile the release artifact for shipping.