Preview which files Cargo will include.
Section: Build scripts, install, and publish checks
See what would be packaged
bash
bash
cargo package --listExplanation
Useful when publication issues are caused by missing files, ignored files, or unexpected package contents.
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 Build scripts, install, and publish checks
Validate publishing without uploading
Run Cargo’s publish checks as a dry run.
Inspect build-script output clearly
Use very verbose mode to surface build-script details.
Install the current CLI crate locally
Compile and install from the current path.
Build with the lockfile enforced
Refuse dependency resolution changes during CI.