Crates.io | cargo-deplint |
lib.rs | cargo-deplint |
version | 0.1.0 |
source | src |
created_at | 2023-09-08 22:43:39.065947 |
updated_at | 2023-09-08 22:43:39.065947 |
description | A utility for enforcing rules about crate dependency graphs |
homepage | |
repository | https://github.com/danhhz/cargo-deplint |
max_upload_size | |
id | 967845 |
size | 32,448 |
A utility for enforcing rules about crate dependency graphs.
cargo deplint
can be installed with cargo install
. The resulting binary
should then be in $HOME/.cargo/bin
.
$ cargo install cargo-deplint
Use it by providing the path to a Cargo.lock file and a lints file:
$ cargo deplint Cargo.lock deplints.toml
The file defining the lints is a toml that looks as follows.
[[deny]]
name = "foo"
dependencies = [
"bar",
]
The above disallows crate foo
from depending on crate bar
, including
transitively.
cargo metadata
instead of the Cargo.lock
file so that we
can distinguish between regular dependencies and dev-dependencies.