From 0a2fc40f8bfa4065aeb6fa4f7c431424312851e1 Mon Sep 17 00:00:00 2001 From: alexion Date: Thu, 17 Sep 2026 09:28:59 -0400 Subject: [PATCH] feat(skills): require workspace Rust dependency versions --- src/skills/style/rust/rules/cargo.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/skills/style/rust/rules/cargo.md diff --git a/src/skills/style/rust/rules/cargo.md b/src/skills/style/rust/rules/cargo.md new file mode 100644 index 0000000..06d14e6 --- /dev/null +++ b/src/skills/style/rust/rules/cargo.md @@ -0,0 +1,15 @@ +# Cargo rules + +## Use workspace dependency versions + +### Rule + +Declare Rust dependency versions in the repository root `Cargo.toml` under `[workspace.dependencies]`. +Reference workspace dependencies from package `Cargo.toml` files with `workspace = true`. +Do not declare dependency versions in package `Cargo.toml` files unless the operator explicitly requests a package-local version. +Add package-local dependency features only when the feature set is specific to that package. + +### Rationale + +The repository has one Cargo workspace and one `Cargo.lock`. +Centralized dependency versions keep package manifests consistent with the workspace lockfile.