cargo-rail
Rust monorepo tooling for change detection, graph unification, changesets-style releases, and split/sync.
What It Covers
plan/run: file-first change detection for selective build, test, bench, docs, and infra executionunify: workspace dependency unification, feature cleanup, unused dependency detection, and MSRV derivationrelease/change: Rust-native change files, per-crate bump inference, changelog generation, tags, and publish flowsplit/sync: copybara-style crate extraction and bidirectional sync without a separate DSL
Quick Start
Pre-built binaries: GitHub Releases
Core Workflows
Change Detection
Use plan to build the deterministic contract and run to execute only the selected work.
impact is diagnostic. scope is the execution handoff.
Graph Unification
Use unify to keep the workspace dependency graph lean and consistent.
Release Workflow
Use change for reviewed release intent and release for checks, version bumps, changelogs, tags, remote push,
GitHub Releases, and publishing.
Change files live in .rail/changes/*.md and are consumed by release run:
"cargo-rail" = "minor"
Added Rust-native change files for releases.
--bump auto reads change files first, then falls back to conventional commits. For monorepos, commits are
attributed to crates through the workspace graph instead of path-only changelog globs.
For an owned GitHub release, set both push = true and create_github_release = true.
cargo-rail pushes the release commit and tag before publishing crates or making the GitHub Release public.
Split / Sync
Use split and sync when a crate needs to live in both a monorepo and a standalone repository.
GitHub Actions
Use cargo-rail-action for planner gates and execution scope in GitHub Actions.
Config
Primary references:
Migration
Getting Help
- Issues: GitHub Issues
- Crate: crates.io/cargo-rail
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md.
License
Licensed under MIT.