Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cargo-release

> 包管理
Open source

Cargo subcommand `release`: everything about releasing a rust crate.

1.6K stars0 likes1 views
WebsiteGitHub

About

Cargo subcommand `release`: everything about releasing a rust crate.

cargo release

Streamline your crate release process

cargo release extends cargo publish with common release practices like validation, version management, tagging, and pushing. The process is customizable but with defaults that should help you get up and running quickly.

Features include:

  • Ensure you are in a good state for release, including:
    • Right branch
    • Up-to-date with remote
    • Clean tree
  • Supports workspaces using cargo's native flags, like --workspace, --exclude and --package
    • Updates dependent crates in workspace when changing version
    • Change detection to help guide in what crates might not need a release
    • Optionally share commits
  • Handles cargo publish, tagging, and pushing
  • Pre-release search and replace for custom version updates, including
    • Updating changelogs
    • Update tags in Dockerfiles
  • Pre-release hook for extra customization, including
    • CHANGELOG generation

Install

Current release: 1.1.6

$ cargo install cargo-release

Usage

$ cargo release [level]
<dry-run output>
$ cargo release [level] --execute
  • See the reference for more on level, other CLI arguments, and configuration file format.
  • See also the FAQ for help in figuring out how to adapt cargo-release to your workflow.

Prerequisite

  • Your project should be managed by git.

Dry run

By default, cargo-release runs in dry-run mode so you can safely run it and verify what it will do.

  • Increase the logging level with each additional -v to get more details
  • Speed up dry-run by skipping cargo-publishs verify step with --no-verify

Once you are ready, pass the --execute flag.

Note: the packaging and verifying steps will list the current version and not the bumped version because cargo release delegates to cargo publish which does not know about the in-memory-only version bump (#890).

Related tools

  • release-pr Action
  • cargo-smart-release
  • cargo-set-version
  • cargo-unleash
  • release-plz
  • cargo-workspaces

Semver Compatibility

cargo-release's versioning tracks compatibility for the binaries, not the API. We upload to crates.io to distribute the binary. If using this as a library, be sure to pin the version with a = version requirement operator.

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or https://opensource.org/license/mit)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcargocargo-subcommandrust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category包管理
PricingOpen source

> Related tools

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image