1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-29 21:35:32 +02:00
tldr/pages/common/cargo-publish.md
Managor 5305776d45
*: capitalize the first letter after "Note:" (#16226)
Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
2025-05-04 05:15:17 +03:00

601 B

cargo publish

Upload a package to a registry. Note: You have to add an authentication token using cargo login before publishing a package. More information: https://doc.rust-lang.org/cargo/commands/cargo-publish.html.

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

cargo publish

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

cargo publish --dry-run

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

cargo publish --registry {{name}}