You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Optionally pins transitives** (`cargo-hakari` or workspace-hack replacement)
93
+
94
+
Use `unify sync` in pre-commit hooks or CI to enforce a lean, consistent dependency graph or after adding new target triples to your CI matrix or `.cargo/config.toml`.
84
95
85
96
### Split & Sync
86
97
@@ -89,81 +100,81 @@ Extract crates to standalone repos and keep them in sync, with deterministic SHA
89
100
Three modes: single crate to new repo, multiple crates to new repo, or multiple crates to a new workspace.
90
101
91
102
```bash
92
-
cargo rail split init crate # Configure split for crate/s
93
-
cargo rail split run crate --check # Preview the split
94
-
cargo rail split run crate # Execute the split
103
+
cargo rail split init crate # Configure split for crate/s
104
+
cargo rail split run crate --check # Preview the split
Split/sync behavior is driven by `[crates.NAME.split]` in `rail.toml`. See [docs/config.md](docs/config.md)
112
+
Split/sync behavior is driven by `[crates.NAME.split]` in `rail.toml`. 3-way conflict resolution is configurable in `rail.toml` once a split has been initialized. See [docs/config.md](docs/config.md)
102
113
103
114
### Release
104
115
105
116
Version bumping, changelog generation, tagging, and publishing in dependency order:
| Google's `Copybara` for Rust teams |`split` + `sync` commands |
202
213
| Mountain of shell scripts |`test` + `affected` + [`cargo-rail-action`](https://github.com/loadingalias/cargo-rail-action) in CI |
203
214
215
+
#### NOTE ON MSRV
216
+
217
+
The `msrv=true` configuration doesn't mean `cargo-rail` runs compilation checks. Instead, it computes the floor msrv for the workspace, and takes your own `rust-version` into consideration. This allows you to immediately determine the msrv for your workspace based on the dependencies you're using and your own `rust-version`.
218
+
204
219
---
205
220
206
221
## Design Notes
207
222
208
-
I've built cargo-rail as a necessity for my own work. I've explained the reasoning behind it and touched on the plans for the future in this post: [Rust Monorepo Tooling](http://loadingalias.com/blog). I would love contributions; I'd love to iron out the details and workflows that we all use daily but that are clunky.
223
+
I've built cargo-rail as a necessity for my own work and for that reason it's opinionated. I've explained the thought process behind it and touched on the plans for the future in this post: [Coming Soon](http://loadingalias.com/blog/). I am absolutely hoping to get the community involved in improving the tooling here; contributions are welcome!
209
224
210
225
**Supply-Chain Safety**
211
226
212
-
This matters a great deal to me. I've tried to keep the tool itself lean; avoids large meta-dependency graphs. Currently, cargo-rail depends on 11 core deps; 77 resolved in the release build.
227
+
This matters a great deal to me. I've tried to keep the tool itself lean; it deliberately avoids large meta-dependency graphs. Currently, cargo-rail depends on 11 core deps; 77 resolved in the release build.
213
228
214
229
**Multi-Target Resolution**
215
230
216
-
Runs `cargo metadata --filter-platform` per target and computes feature intersection, not union.I often build for 7-9 target-triples; this was a requirement.
231
+
cargo-rail runs `cargo metadata --filter-platform` per target-triple and computes feature intersection, not union... with guardrails in place, obviously. I often build for 6-9 target-triples... so this was a requirement.
217
232
218
233
**System Git > Gix**
219
234
220
-
I've used the `git` binary directly for deterministic SHAs and proper history, no libgit2/gitoxide. They felt a bit heavy for the use case and we all use Git locally in some fashion.
235
+
I've used the `git` binary directly for deterministic SHAs and proper history, no `libgit2` / `gitoxide`. They felt a bit heavy for this use case and I'm assuming we all use git locally in some fashion anyway.
221
236
222
237
**Lossless TOML**
223
238
224
-
Uses `toml_edit` so existing comments and layout are preserved. Manipulating TOML is honestly not as easy as it sounds. Please, if you run into any problems... open an 'Issue' and I'll take a look.
239
+
I've used `toml_edit` so that existing comments and layout are preserved. Manipulating TOML is not as straightforward as it sounds. Please, if you run into any problems... open an 'Issue' and I'll take a look... or submit a PR.
cargo rail unify sync # Re-detect and merge targets into rail.toml
203
206
```
204
207
205
208
---
@@ -222,6 +225,34 @@ Options:
222
225
223
226
---
224
227
228
+
### cargo rail unify sync
229
+
230
+
```
231
+
Re-detect and sync targets to rail.toml
232
+
233
+
Scans workspace for target triples (rust-toolchain.toml, .cargo/config.toml, etc.) and merges any new targets into your rail.toml configuration. Preserves existing targets and all other settings.
0 commit comments