Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
137 lines (114 loc) · 5.18 KB
/
Copy pathCargo.toml
File metadata and controls
137 lines (114 loc) · 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[package]
name = "blake3-servil"
# The fork's own version series, from 0.1.0, based on upstream BLAKE3 1.8.7:
# tools/gen-ver.py sets X.Y.Z+<commit> here and tags vX.Y.Z+<commit>.
version = "0.3.0+2e4fa821f9db07b945dbb2b0d02eb76cb19617b5"
authors = ["Jack O'Connor <oconnor663@gmail.com>", "Samuel Neves", "John Servil"]
description = "the BLAKE3 hash function, with SME2 and integer + NEON kernels for AArch64 and a shared thread pool"
repository = "https://github.com/johnservil/BLAKE3"
license = "CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2024"
# What a build from crates.io needs: the library, its assembly and build
# script, the pages users read, the licences, and the file the tests include.
include = ["/src", "/c", "/build.rs", "/README.md", "/CHANGELOG.md", "/QUALITY.md", "/LICENSE_*", "/tools/require_nextest.rs"]
[features]
default = ["std"]
# The Wasm SIMD implementation does not participate in dynamic feature detection,
# Note that not all Wasm implementations support the Wasm SIMD specification.
# This may become the default in the future.
# Enables std::io traits, including impl Write for Hasher, impl Read and Seek
# for OutputReader, and the Hasher::update_reader method. This feature is
# enabled by default. (Previously this also controlled runtime CPU feature
# detection on x86, which now reads CPUID directly, with or without std.)
# Also enables the `std` feature of the `constant_time_eq` dependency, which
# toggles a runtime feature check on 64-bit ARM targets.
std = ["constant_time_eq/std"]
# Implement the zeroize::Zeroize trait for types in this crate.
zeroize = ["dep:zeroize", "arrayvec/zeroize"]
# ---------- Features below this line are undocumented and unstable. ----------
# The following features are mainly intended for testing and benchmarking, and
# they might change or disappear at any time without a major version bump.
# By default on x86_64, this crate uses Samuel Neves' hand-written assembly
# implementations for SSE4.1, AVX2, and AVX512. (These provide both the best
# runtime performance, and the fastest build times.) If a C compiler is not
# detected, or if AVX-512 support is missing from the detected compiler,
# build.rs automatically falls back to a pure Rust build. This feature forces
# that fallback, for testing purposes. (Note that in CI testing, we set the
# BLAKE3_CI environment variable, which instructs build.rs to error out rather
# than doing an automatic fallback.)
pure = []
[package.metadata.docs.rs]
# Document the Serialize/Deserialize/Zeroize impls on docs.rs.
features = ["serde", "zeroize"]
# The integration tests exercise the pool and the queue, which need std.
[[test]]
name = "api_plan"
required-features = ["std"]
[[test]]
name = "stream_one_cpu"
required-features = ["std"]
[[test]]
name = "stream_collect_no_workers"
required-features = ["std"]
[[test]]
name = "stream_collect_one_worker"
required-features = ["std"]
[[test]]
name = "stream_collect_parked_workers"
required-features = ["std"]
[[test]]
name = "stream_finish_parked_workers"
required-features = ["std"]
[[test]]
name = "stream_collect_with_workers"
required-features = ["std"]
[[test]]
name = "initialize_multithreaded_contract"
required-features = ["std"]
[dependencies]
arrayvec = { version = "0.7.4", default-features = false }
constant_time_eq = { version = "0.4.2", default-features = false }
cfg-if = "1.0.0"
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
zeroize = { version = "1", default-features = false, optional = true }
[target.'cfg(all(target_arch = "aarch64", any(target_vendor = "apple", target_os = "linux")))'.dependencies]
libc = { version = "0.2", default-features = false }
# The guard-page tests (src/test.rs) on x86-64 too.
[target.'cfg(all(target_arch = "x86_64", any(target_vendor = "apple", target_os = "linux")))'.dev-dependencies]
libc = { version = "0.2", default-features = false }
# Co-linking test: upstream's native symbols must not replace ours.
[target.'cfg(target_arch = "x86_64")'.dev-dependencies]
blake3 = { version = "=1.8.7", default-features = false, features = ["std"] }
[dev-dependencies]
rand = "0.10.0"
hmac = "0.13.0"
hex = "0.4.2"
reference_impl = { path = "./reference_impl" }
clocks = { path = "./clocks" }
tempfile = "3.8.0"
serde_json = "1.0.107"
ciborium = "0.2.2"
# tests/shuttle_*.rs: the pool's handshakes under a model checker.
shuttle = "0.8"
[build-dependencies]
cc = "1.1.12"
# Tests built as users' release build is (opt-level 3, 16 codegen units,
# no incremental compilation, no debug info), with its checks on: debug
# assertions and overflow checks, which name a broken assumption where
# users' build would pass it silently. `cargo test --release` runs users'
# build exactly.
[profile.test]
opt-level = 3
codegen-units = 16
incremental = false
debug = false
debug-assertions = true
overflow-checks = true
# Mutation testing (tools/mutants/check.py) builds what users run: a mutant
# that only a debug assertion or an overflow check would catch is uncaught
# in a release. Built incrementally, since cargo-mutants rebuilds the crate
# once per mutant (opt-level 1 made a whole run no faster, October 21).
[profile.mutants]
inherits = "release"
incremental = true