Files
cheatsheet-tldr/tldr/cargo-package
2025-07-21 00:23:22 +00:00

19 lines
553 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# cargo package
> Assemble a local package into a distributable tarball (a `.crate` file).
> Similar to `cargo publish --dry-run`, but has more options.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-package.html>.
- Perform checks and create a `.crate` file (equivalent of `cargo publish --dry-run`):
`cargo package`
- Display what files would be included in the tarball without actually creating it:
`cargo package {{[-l|--list]}}`