LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cargo-publish

Upload a package to a registry

TLDR

Publish to crates.io
$ cargo publish
copy
Dry run without uploading
$ cargo publish --dry-run
copy
Publish without verification
$ cargo publish --no-verify
copy
Allow uncommitted changes
$ cargo publish --allow-dirty
copy
Publish to alternate registry
$ cargo publish --registry [my-registry]
copy
Publish specific package
$ cargo publish -p [crate_name]
copy

SYNOPSIS

cargo publish [options]

DESCRIPTION

cargo publish uploads a package to crates.io or another registry. It creates a `.crate` archive, verifies that the archive builds successfully, and then uploads it to the registry. Authentication is required and is typically set up via `cargo login`.Publishes are permanent and cannot be deleted or overwritten. Once a version is published, that exact version number can never be reused. The `cargo yank` command can mark a version as deprecated to prevent new projects from depending on it, but it remains available for existing users. Before publishing, ensure the version number in Cargo.toml has been incremented according to semver conventions.

PARAMETERS

--dry-run

Perform checks without uploading
--no-verify
Skip build verification
--allow-dirty
Allow uncommitted VCS changes
--registry name
Target registry
--index url
Registry index URL
--token token
API token
-p, --package spec
Package to publish
--target triple
Build target for verification
-j, --jobs n
Parallel jobs
--features features
Enable features for verification
--all-features
Enable all features

CONFIGURATION

~/.cargo/credentials.toml

Stores API tokens for crates.io and other registries. Created by `cargo login`.

PREPARATION

1. Create account on crates.io2. Verify email address3. Generate API token4. Run cargo login

RELEASING NEW VERSIONS

1. Update version in Cargo.toml2. Optionally run cargo package3. Run cargo publish

INSTALL

sudo apt install cargo
copy
sudo dnf install cargo
copy
sudo apk add cargo
copy
sudo zypper install cargo
copy
nix profile install nixpkgs#cargo
copy

CAVEATS

Publishes are permanent. Use cargo yank to mark versions as deprecated but not delete them. Follow semver for version changes.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid