44
55[ ![ Crates.io] ( https://img.shields.io/crates/v/cargo-rail.svg )] ( https://crates.io/crates/cargo-rail )
66[ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( LICENSE )
7- [ ![ Rust Version] ( https://img.shields.io/badge/rust-1.91 %2B-orange.svg )] ( https://www.rust-lang.org )
7+ [ ![ Rust Version] ( https://img.shields.io/badge/rust-1.89 %2B-orange.svg )] ( https://www.rust-lang.org )
88
99Stop wasting CI time. Stop fighting workspace dependencies. Stop copy-pasting git history.
1010
@@ -20,9 +20,19 @@ cargo install cargo-rail
2020
2121| Problem | Solution | Impact |
2222| ---------| ----------| --------|
23- | 🔥 ** Testing everything on every PR** | Graph-aware change detection | ** 10x faster CI** |
24- | 💥 ** Dependency fragmentation** | Resolution-based unification | ** Zero workspace-hack crates** |
25- | 🔨 ** Distributing crates** | History-preserving split/sync | ** One command, full git history** |
23+ | ** Testing everything on every PR** | Graph-aware change detection | ** 10x faster CI** |
24+ | ** Dependency fragmentation** | Resolution-based unification | ** Zero workspace-hack crates** |
25+ | ** Distributing crates** | History-preserving split/sync | ** One command, full git history** |
26+
27+ ### Replaces
28+
29+ | Tool | What cargo-rail does instead |
30+ | ------| ------------------------------|
31+ | ** cargo-hakari** | Native ` workspace.dependencies ` unification—no workspace-hack crate |
32+ | ** cargo-release / release-plz** | Dependency-ordered releases with native changelog generation |
33+ | ** git-cliff** | Built-in conventional commit parsing (zero-copy, no external dep) |
34+ | ** Copybara** | Deterministic split/sync with git-notes mapping |
35+ | ** CI shell scripts** | Graph-aware ` cargo rail affected ` with nextest/bacon integration |
2636
2737---
2838
@@ -156,7 +166,7 @@ def456 fix: critical bug # Same SHA!
156166
157167- ** System git only** – No libgit2/gitoxide dependency overhead
158168- ** Direct graph construction** – ` cargo_metadata ` + ` petgraph ` (no guppy)
159- - ** 8 core dependencies** – Minimal, auditable supply chain
169+ - ** 11 core dependencies** – Minimal, auditable supply chain
160170
161171### Design Principles
162172
@@ -220,26 +230,80 @@ cargo rail sync my-crate # Bidirectional sync
220230cargo rail status # Show sync status
221231```
222232
223- ### Release Automation
233+ ### Release Automation (replaces cargo-release + git-cliff)
224234
225235``` bash
226- cargo rail release plan --all # Plan release
227- cargo rail release publish --execute # Publish to crates.io
236+ # Plan releases with dependency-aware ordering
237+ cargo rail release --all --bump minor --dry-run
238+
239+ # Execute: bump versions, generate changelogs, tag, publish
240+ cargo rail release --all --bump patch --execute
241+ ```
242+
243+ ** What it does:**
244+
245+ - Native changelog generation from conventional commits (no git-cliff dependency)
246+ - Dependency-ordered publishing (deps before dependents)
247+ - Configurable delays between publishes (avoids registry race conditions)
248+ - GitHub release creation via ` gh ` CLI (optional)
249+ - GPG/SSH tag signing support
250+
251+ ### Watch Mode (bacon/cargo-watch integration)
252+
253+ ``` bash
254+ # Auto-detect best watcher and run smart tests
255+ cargo rail test --watch
256+
257+ # Explicit watcher selection
258+ cargo rail test --watch --watch-mode bacon
228259```
229260
230261---
231262
232263## Comparison
233264
234- | Feature | cargo-rail | cargo-hakari | Copybara |
235- | ---------| -----------| -------------| ----------|
236- | Dependency unification | ✅ Resolution-based | ✅ Syntax-only | ❌ |
237- | Workspace-hack crate | ❌ Not needed | ✅ Required | ❌ |
238- | Git history preservation | ✅ Full | ❌ | ⚠️ Partial |
239- | Bidirectional sync | ✅ | ❌ | ✅ |
240- | Deterministic | ✅ Same SHAs | N/A | ❌ |
241- | Smart testing | ✅ Graph-aware | ❌ | ❌ |
242- | Dependencies | 8 core | ~ 40+ (via guppy) | Go ecosystem |
265+ ### vs Dependency Management
266+
267+ | Feature | cargo-rail | cargo-hakari |
268+ | ---------| -----------| -------------|
269+ | Dependency unification | ✅ Resolution-based | ✅ Syntax-only |
270+ | Feature selection | Intersection (minimal) | Union (maximal) |
271+ | Workspace-hack crate | ❌ Not needed | ✅ Required |
272+ | TOML preservation | ✅ Lossless | ⚠️ Regenerates |
273+ | Dependencies | 10 core | ~ 40+ (via guppy) |
274+
275+ ### vs Release Automation
276+
277+ | Feature | cargo-rail | cargo-release | release-plz |
278+ | ---------| -----------| --------------| -------------|
279+ | Version bumping | ✅ | ✅ | ✅ |
280+ | Changelog generation | ✅ Native | ❌ External | ✅ |
281+ | Dependency ordering | ✅ Graph-aware | ⚠️ Manual | ✅ |
282+ | GitHub releases | ✅ via gh | ❌ | ✅ |
283+ | Publish delay | ✅ Configurable | ❌ | ✅ |
284+ | Tag signing | ✅ | ✅ | ✅ |
285+ | Dependencies | 90 | -| 600+|
286+
287+ ### vs Monorepo Sync
288+
289+ | Feature | cargo-rail | Copybara | git-filter-repo |
290+ | ---------| -----------| ----------| -----------------|
291+ | Git history preservation | ✅ Full | ⚠️ Partial | ✅ Full |
292+ | Bidirectional sync | ✅ | ✅ | ❌ One-way |
293+ | Deterministic SHAs | ✅ | ❌ | ✅ |
294+ | Conflict resolution | ✅ 3-way merge | ✅ | ❌ |
295+ | Commit mapping | ✅ git-notes | Custom DB | ❌ |
296+ | Language | Rust | Go | Python |
297+
298+ ### vs CI Optimization
299+
300+ | Feature | cargo-rail | Custom scripts | nx/turborepo |
301+ | ---------| -----------| ---------------| --------------|
302+ | Change detection | ✅ Graph-aware | ⚠️ Path-based | ✅ Graph-aware |
303+ | Rust-native | ✅ | ⚠️ Shell | ❌ JS ecosystem |
304+ | Nextest integration | ✅ Auto-detect | Manual | ❌ |
305+ | Watch mode | ✅ bacon/cargo-watch | Manual | ✅ |
306+ | Dependency resolution | ✅ Cargo's resolver | ❌ | ❌ |
243307
244308---
245309
0 commit comments