cargo packageValidates and assembles the publishable package locally.
Package local crates, install binaries, publish to crates.io, and prepare Rust CLI releases.
Prepare release artifacts and inspect package contents.
cargo packageValidates and assembles the publishable package locally.
cargo package --listUseful for catching missing files or extra junk before publishing.
cargo publish --dry-runA safer preflight step before a real crates.io publish.
cargo clean && cargo build --releaseHelps surface missing tracked files or stale artifacts before release.
Install tools from crates.io, git, local paths, or locked dependencies.
cargo install ripgrep`cargo install` manages Cargo's local set of installed binary crates.
cargo install ripgrep --version 14.1.0Useful for reproducibility in local developer setups.
cargo install --locked ripgrepCommon when you want installation to match the published lockfile.
cargo install --path .Great for trying your CLI exactly as users would invoke it.
cargo install --git https://github.com/sharkdp/batUseful for unreleased versions or internal tools.
cargo uninstall ripgrepCleans up tools from Cargo's install root.
Authentication, publishing, and registry-related tasks.
cargo login <token>Stores the token so Cargo can publish to the registry.
cargo owner --add github:org:team mycrateUseful for shared maintenance of published crates.
cargo publishThe default registry is crates.io unless another registry is specified.
cargo search clapA quick way to discover package names before adding dependencies.
cargo yank --vers 1.2.3 mycrateYanking hides a release from new resolution without deleting it.
Practical release commands for Rust CLI apps.
cargo build --releaseThe default production build path for many CLI apps.
cargo build --release --target x86_64-unknown-linux-muslCommon for distributing portable Linux executables.
cargo pkgidHandy when scripting release steps, though tags are usually managed separately.