Skip to content

Commit 91118bb

Browse files
committed
shear
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent fb1e677 commit 91118bb

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,20 @@ Read the [Rust version compatibility policy](README.md#rust-version-compatibilit
8282
changing `rust-version`; when the MSRV job fails, the usual fix is in the code or the dependency
8383
update, not the MSRV.
8484

85+
### Pruning Rust dependencies
86+
87+
Use [cargo-shear](https://github.com/Boshen/cargo-shear) to find unused dependencies. Install it
88+
and inspect the workspace from the repository root:
89+
90+
```bash
91+
cargo install --locked cargo-shear
92+
cargo shear
93+
```
94+
95+
Run `cargo shear --fix` to apply suggested fixes, then review the manifest changes. Dependencies
96+
used only by generated code or to enable transitive features may need an entry in the affected
97+
crate's `[package.metadata.cargo-shear]` `ignored` list, with a comment explaining why.
98+
8599
### Python bindings
86100

87101
`vortex-data` is a mixed Python and Rust package. `uv` manages its Python environment, and

‎encodings/fsst/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ name = "chunked_dict_fsst_builder"
5656
harness = false
5757
required-features = ["_test-harness"]
5858

59-
[package.metadata.cargo-machete]
59+
[package.metadata.cargo-shear]
6060
ignored = ["fsst-rs"]

‎vortex-array/Cargo.toml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ all-features = true
1919
# Referenced only by the generated Protocol Buffers bindings.
2020
ignored = ["prost-types"]
2121

22-
[package.metadata.cargo-machete]
23-
# Referenced only by the generated Protocol Buffers bindings.
24-
ignored = ["prost-types"]
25-
2622
[lints]
2723
workspace = true
2824

‎vortex-cuda/cub/Cargo.toml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ version = { workspace = true }
1717
publish = false
1818

1919
[package.metadata.cargo-shear]
20-
ignored = ["libloading"]
21-
22-
[package.metadata.cargo-machete]
2320
# Referenced only by bindgen's generated dynamic library loader.
2421
ignored = ["libloading"]
2522

‎vortex-cuda/nvcomp/Cargo.toml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ version = { workspace = true }
1414
publish = false
1515

1616
[package.metadata.cargo-shear]
17-
ignored = ["libloading"]
18-
19-
[package.metadata.cargo-machete]
2017
# Referenced only by bindgen's generated dynamic library loader.
2118
ignored = ["libloading"]
2219

‎vortex-layout/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ harness = false
9393
[lints]
9494
workspace = true
9595

96-
[package.metadata.cargo-machete]
96+
[package.metadata.cargo-shear]
9797
ignored = ["uuid"]

0 commit comments

Comments
 (0)