Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow banning or requiring specific features #253

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
70 changes: 39 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Expand Up @@ -103,3 +103,6 @@ lazy_static = "1.4.0"
# We use this for creating fake crate directories for
# crawling license files on disk
tempfile = "3.1.0"

[patch.crates-io]
krates = { path = "../krates" }
24 changes: 24 additions & 0 deletions docs/src/checks/bans/cfg.md
Expand Up @@ -8,6 +8,30 @@ Contains all of the configuration for `cargo deny check bans`
{{#include ../../../../tests/cfg/bans.toml}}
```

### The `deny-features` field (optional)

If any of the denied features for a specific crate is used in the
dependency graph, cargo-deny will deny it.

**Note:** If this field is provided, cargo-deny will not ban the crate,
unless it uses denied features.

### The `allow-features` field (optional)

A specific crate can only use the features provided in this config entry.
If this is an empty set, it will have no effect.

**Note:** If this field is provided, cargo-deny will not ban the crate,
unless it uses non-allowed features.

### The `exact-features` field (optional)

Makes `allow-features` strict. If this is true, the feature set
of the crate must be exactly the same as the `allow-features` set.

**Note:** If this field is provided, cargo-deny will not ban the crate,
unless the feature set doesn't match exactly.

### The `multiple-versions` field (optional)

Determines what happens when multiple versions of the same crate are
Expand Down