This project uses cargo-release to automate the release process for the workspace.
Install cargo-release:
cargo install cargo-releaseBefore releasing, ensure:
- All tests pass:
cargo test --all --all-features - Code is formatted:
cargo fmt --all - Lints pass:
cargo clippy --all --all-features - Documentation builds:
cargo doc --all --all-features --no-deps - The working directory is clean (commit any pending changes)
Always do a dry run first to see what will happen:
# Patch release (0.0.x)
cargo release --workspace patch --dry-run
# Minor release (0.x.0)
cargo release --workspace minor --dry-run
# Major release (x.0.0)
cargo release --workspace major --dry-runReview the output carefully. It will show:
- Which crates will be updated
- What the new versions will be
- What commits and tags will be created
- The publishing order
Once you're satisfied with the dry run:
# Patch release
cargo release --workspace patch --execute
# Minor release
cargo release --workspace minor --execute
# Major release
cargo release --workspace major --executeThis will:
- Update version numbers in all
Cargo.tomlfiles - Update dependency versions between workspace crates
- Create a git commit with the version changes
- Create git tags (one per crate:
v<version>) - Publish crates to crates.io in dependency order
The release process does NOT automatically push (configured in release.toml). After reviewing the commits and tags locally:
# Push commits
git push origin master
# Push all tags
git push origin --tagsYou can manually create a GitHub release from the tags, or use the GitHub CLI:
gh release create v11.0.2 --generate-notesIf publishing fails for a crate after some crates have already been published:
- Fix the issue (e.g., update metadata, fix tests)
- Re-run
cargo release- it will skip already-published crates - Or manually publish the remaining crates:
cargo publish -p <crate-name>
If you published the wrong version:
- You cannot unpublish from crates.io (versions are immutable)
- You can yank the version:
cargo yank --vers <version> <crate-name> - Release a new corrected version
If you created commits/tags but haven't pushed or published yet:
# Remove the last commit (keeps changes)
git reset --soft HEAD~1
# Delete local tags
git tag -d v11.0.2 # repeat for each tagThis workspace uses coordinated versioning for core crates:
varlink,varlink_generator,varlink_stdinterfacesshare major version numbersvarlink_parserhas independent versioning (currently v5.x)varlink_derivehas independent versioning (currently v10.x)
Patch Release (x.y.Z):
- Bug fixes
- Documentation updates
- Performance improvements (no API changes)
Minor Release (x.Y.0):
- New features (backward compatible)
- New async functionality
- Deprecations (but not removals)
Major Release (X.0.0):
- Breaking API changes
- Removal of deprecated features
- Major architectural changes
release.toml- Main cargo-release configurationCargo.toml(workspace root) - Workspace-level release metadata- Each crate's
Cargo.toml- Individual crate versions and dependencies