commands.sh

cargo publish

all

Upload a package to a registry. Note: You have to add an authentication token using `cargo login` before publishing a package.

More info →

Options (1)

-n, --dry-runboolean

Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`)

Example: cargo publish {{[-n|--dry-run]}}

Examples (3)

Perform checks, create a `.crate` file and upload it to the registry

Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`)

cargo publish [-n|--dry-run]

Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>)

cargo publish --registry name
made by @shridhargupta | data from tldr-pages