cargo-publish --- Upload a package to the registry
cargo publish
[options]
This command will create a distributable, compressed .crate
file with the source code of the package in the current directory and upload it to a registry. The default registry is https://crates.io. This performs the following steps:
package.publish
key in the manifest for restrictions on which registries you are allowed to publish to..crate
file by following the steps in cargo-package(1).This command requires you to be authenticated with either the --token
option or using cargo-login(1).
See the reference for more details about packaging and publishing.
By default, the package in the current working directory is selected. The -p
flag can be used to choose a different package in a workspace.
The feature flags allow you to control which features are enabled. When no feature options are given, the default
feature is activated for every selected package.
See the features documentation for more details.
See the reference for details on environment variables that Cargo reads.
0
: Cargo succeeded.101
: Cargo failed to complete.Publish the current package:
cargo publish