Is your feature request related to a problem? Please describe.
bans allows/denies crates workspace-wide, but there's no way to restrict specific crates within a workspace to a subset of dependencies. e.g. in DDD terms, a "domain" layer of crates that must never depend on tokio/hyper/reqwest (or even other crates in the same workspace).
Describe the solution you'd like
Config that declares named layers (crate → layer membership) and, per layer, a list of forbidden external crates. Something like
[[bans.layers]]
name = "dmn"
members = ["dmn1", "dmn2", "dmn3"]
deny = ["tokio", "hyper", "reqwest", "mio", "async-trait"]
Describe alternatives you've considered
A hand-made shell script doing this via cargo metadata and string matching. It works but it's fragile and not declarative.
Additional context
Related to: open #776, closed #409
Is your feature request related to a problem? Please describe.
bansallows/denies crates workspace-wide, but there's no way to restrict specific crates within a workspace to a subset of dependencies. e.g. in DDD terms, a "domain" layer of crates that must never depend ontokio/hyper/reqwest(or even other crates in the same workspace).Describe the solution you'd like
Config that declares named layers (crate → layer membership) and, per layer, a list of forbidden external crates. Something like
Describe alternatives you've considered
A hand-made shell script doing this via
cargo metadataand string matching. It works but it's fragile and not declarative.Additional context
Related to: open #776, closed #409