-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6a98da
commit 9b79510
Showing
13 changed files
with
580 additions
and
125 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
[graph] | ||
targets = [] | ||
#exclude = [] | ||
all-features = false | ||
no-default-features = false | ||
#features = [] | ||
|
||
# The output table provides options for how/if diagnostics are outputted | ||
[output] | ||
feature-depth = 1 | ||
|
||
[advisories] | ||
ignore = [] | ||
[licenses] | ||
unused-allowed-license = "allow" | ||
allow = [ | ||
"AFL-1.1", | ||
"AFL-1.2", | ||
"AFL-2.0", | ||
"AFL-2.1", | ||
"AFL-3.0", | ||
# "AGPL-3.0", # I don't have any problem with AGPL, but the Google _hates_ it | ||
"Apache-1.1", | ||
"Apache-2.0", | ||
"APSL-2.0", | ||
"Artistic-2.0", | ||
"BSD-2-Clause", | ||
"BSD-3-Clause", | ||
"BSL-1.0", | ||
"CDDL-1.0", | ||
"CPAL-1.0", | ||
"CPL-1.0", | ||
"ECL-2.0", | ||
"EFL-2.0", | ||
"EPL-1.0", | ||
"EPL-2.0", | ||
"EUDatagrid", | ||
"EUPL-1.1", | ||
"EUPL-1.2", | ||
"GPL-2.0", | ||
"GPL-3.0", | ||
"HPND", | ||
"Intel", | ||
"IPA", | ||
"IPL-1.0", | ||
"ISC", | ||
"LGPL-2.1", | ||
"LGPL-3.0", | ||
"LPL-1.02", | ||
"MIT", | ||
"MPL-1.1", | ||
"MPL-2.0", | ||
"MS-PL", | ||
"MS-RL", | ||
"NCSA", | ||
"Nokia", | ||
"OFL-1.1", | ||
"OSL-1.0", | ||
"OSL-2.0", | ||
"OSL-2.1", | ||
"OSL-3.0", | ||
"PHP-3.01", | ||
"Python-2.0", | ||
"QPL-1.0", | ||
"RPSL-1.0", | ||
"SISSL", | ||
"Sleepycat", | ||
"SPL-1.0", | ||
"Unlicense", | ||
"UPL-1.0", | ||
"W3C", | ||
"Zlib", | ||
"ZPL-2.0", | ||
"ZPL-2.1", | ||
] | ||
# The confidence threshold for detecting a license from license text. | ||
# The higher the value, the more closely the license text must be to the | ||
# canonical license text of a valid SPDX license file. | ||
# [possible values: any between 0.0 and 1.0]. | ||
confidence-threshold = 1.0 | ||
# Allow 1 or more licenses on a per-crate basis, so that particular licenses | ||
# aren't accepted for every possible crate as with the normal allow list | ||
exceptions = [ | ||
# Each entry is the crate and version constraint, and its specific allow | ||
# list | ||
#{ allow = ["Zlib"], crate = "adler32" }, | ||
# mostly harmless | ||
{ allow = ["Unicode-DFS-2016"], crate = "unicode-ident" }, | ||
] | ||
|
||
# Some crates don't have (easily) machine readable licensing information, | ||
# adding a clarification entry for it allows you to manually specify the | ||
# licensing information | ||
#[[licenses.clarify]] | ||
# The package spec the clarification applies to | ||
#crate = "ring" | ||
# The SPDX expression for the license requirements of the crate | ||
#expression = "MIT AND ISC AND OpenSSL" | ||
# One or more files in the crate's source used as the "source of truth" for | ||
# the license expression. If the contents match, the clarification will be used | ||
# when running the license check, otherwise the clarification will be ignored | ||
# and the crate will be checked normally, which may produce warnings or errors | ||
# depending on the rest of your configuration | ||
#license-files = [ | ||
# Each entry is a crate relative path, and the (opaque) hash of its contents | ||
#{ path = "LICENSE", hash = 0xbd0eed23 } | ||
#] | ||
|
||
[licenses.private] | ||
# If true, ignores workspace crates that aren't published, or are only | ||
# published to private registries. | ||
# To see how to mark a crate as unpublished (to the official registry), | ||
# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. | ||
ignore = true | ||
# One or more private registries that you might publish crates to, if a crate | ||
# is only published to private registries, and ignore is true, the crate will | ||
# not have its license(s) checked | ||
registries = [ | ||
#"https://sekretz.com/registry | ||
] | ||
|
||
# This section is considered when running `cargo deny check bans`. | ||
# More documentation about the 'bans' section can be found here: | ||
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html | ||
[bans] | ||
# Lint level for when multiple versions of the same crate are detected | ||
multiple-versions = "deny" | ||
# Lint level for when a crate version requirement is `*` | ||
wildcards = "deny" | ||
# The graph highlighting used when creating dotgraphs for crates | ||
# with multiple versions | ||
# * lowest-version - The path to the lowest versioned duplicate is highlighted | ||
# * simplest-path - The path to the version with the fewest edges is highlighted | ||
# * all - Both lowest-version and simplest-path are used | ||
highlight = "all" | ||
# The default lint level for `default` features for crates that are members of | ||
# the workspace that is being checked. This can be overridden by allowing/denying | ||
# `default` on a crate-by-crate basis if desired. | ||
workspace-default-features = "allow" | ||
# The default lint level for `default` features for external crates that are not | ||
# members of the workspace. This can be overridden by allowing/denying `default` | ||
# on a crate-by-crate basis if desired. | ||
external-default-features = "allow" | ||
# List of crates that are allowed. Use with care! | ||
allow = [ | ||
#"[email protected]", | ||
#{ crate = "[email protected]", reason = "you can specify a reason it is allowed" }, | ||
] | ||
# List of crates to deny | ||
deny = [ | ||
#"[email protected]", | ||
#{ crate = "[email protected]", reason = "you can specify a reason it is banned" }, | ||
# Wrapper crates can optionally be specified to allow the crate when it | ||
# is a direct dependency of the otherwise banned crate | ||
#{ crate = "[email protected]", wrappers = ["this-crate-directly-depends-on-ansi_term"] }, | ||
] | ||
|
||
# List of features to allow/deny | ||
# Each entry the name of a crate and a version range. If version is | ||
# not specified, all versions will be matched. | ||
#[[bans.features]] | ||
#crate = "reqwest" | ||
# Features to not allow | ||
#deny = ["json"] | ||
# Features to allow | ||
#allow = [ | ||
# "rustls", | ||
# "__rustls", | ||
# "__tls", | ||
# "hyper-rustls", | ||
# "rustls", | ||
# "rustls-pemfile", | ||
# "rustls-tls-webpki-roots", | ||
# "tokio-rustls", | ||
# "webpki-roots", | ||
#] | ||
# If true, the allowed features must exactly match the enabled feature set. If | ||
# this is set there is no point setting `deny` | ||
#exact = true | ||
|
||
# Similarly to `skip` allows you to skip certain crates during duplicate | ||
# detection. Unlike skip, it also includes the entire tree of transitive | ||
# dependencies starting at the specified crate, up to a certain depth, which is | ||
# by default infinite. | ||
skip-tree = [ | ||
#"[email protected]", # will be skipped along with _all_ of its direct and transitive dependencies | ||
#{ crate = "[email protected]", depth = 20 }, | ||
] | ||
|
||
[[bans.skip]] | ||
name = "dpdk-sys" | ||
reason = "workspace internal" | ||
|
||
[[bans.skip]] | ||
name = "scratch" | ||
reason = "workspace internal" | ||
|
||
[[bans.skip]] | ||
name = "dpdk" | ||
reason = "workspace internal" | ||
|
||
[[bans.skip]] | ||
name = "net" | ||
reason = "workspace internal" | ||
|
||
[[bans.skip]] | ||
name = "syn" | ||
reason = "syn is basically always a build time dependency so we aren't shipping multiple versions" | ||
|
||
# This section is considered when running `cargo deny check sources`. | ||
# More documentation about the 'sources' section can be found here: | ||
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html | ||
[sources] | ||
# Lint level for what to happen when a crate from a crate registry that is not | ||
# in the allow list is encountered | ||
unknown-registry = "deny" | ||
# Lint level for what to happen when a crate from a git repository that is not | ||
# in the allow list is encountered | ||
unknown-git = "deny" | ||
# List of URLs for allowed crate registries. Defaults to the crates.io index | ||
# if not specified. If it is specified but empty, no registries are allowed. | ||
allow-registry = ["https://github.com/rust-lang/crates.io-index"] | ||
# List of URLs for allowed Git repositories | ||
allow-git = [] | ||
|
||
[sources.allow-org] | ||
# github.com organizations to allow git sources for | ||
github = [] | ||
# gitlab.com organizations to allow git sources for | ||
gitlab = [] | ||
# bitbucket.org organizations to allow git sources for | ||
bitbucket = [] |
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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
name = "errno" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use std::hint::black_box; | ||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
|
||
fn fibonacci(n: u64) -> u64 { | ||
match n { | ||
0 => 1, | ||
1 => 1, | ||
n => fibonacci(n-1) + fibonacci(n-2), | ||
} | ||
} | ||
|
||
fn criterion_benchmark(c: &mut Criterion) { | ||
c.bench_function("fib 20", |b| b.iter(|| fibonacci(black_box(20)))); | ||
} | ||
|
||
criterion_group!(benches, criterion_benchmark); | ||
criterion_main!(benches); |
Oops, something went wrong.