-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update dependencies * Add license.copyleft config * Add copyleft example * Add precedence note
- Loading branch information
1 parent
fa0cee6
commit 01ea4d2
Showing
12 changed files
with
302 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "deny-copyleft" | ||
version = "0.1.0" | ||
authors = ["Jake Shadle <[email protected]>"] | ||
license = "GPL-3.0 AND MIT" | ||
edition = "2018" | ||
|
||
[[bin]] | ||
name = "deny-copyleft" | ||
path = "main.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 02_deny_copyleft | ||
|
||
This example shows how to explicitly deny certain licenses that will be checked against | ||
the license requirements of every crate in your dependency graph. | ||
|
||
## Requirement | ||
|
||
```toml | ||
license = "MIT AND Apache-2.0" | ||
``` | ||
|
||
## Config | ||
|
||
```toml | ||
[licenses] | ||
allow = [ "MIT" ] | ||
deny = [ "Apache-2.0" ] | ||
``` | ||
|
||
## Description | ||
|
||
Just as we can allow specific licenses, we can deny specific ones via `[licenses.deny]`. Note that the license requirement | ||
has changed to use the operator `AND` instead of `OR` which means that the user is required to license the crate under | ||
both of the licenses, so even though we still allow `MIT`, our denial of `Apache-2.0` causes the expression to fail and | ||
cargo-deny to emit an error that we did not accede to the license requirements of the crate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[licenses] | ||
allow = [ "MIT" ] | ||
copyleft = "deny" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.