Skip to content
masterclass Buddy

Rust · Command

cargo publish

cargo publish packages the current Rust project as a .crate file and uploads it to a registry. It normally publishes to crates.io and requires authentication.

Last updated

Syntax

cargo publish [options]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • cargo login
  • cargo package
  • Cargo.toml
  • package.publish
  • exclude
  • include

Source: cargo publish - The Cargo Book. Checked 2026-11-03.