diff options
| author | Stefan Boberg <[email protected]> | 2025-11-07 14:49:13 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-11-07 14:49:13 +0100 |
| commit | 24e43a913f29ac3b314354e8ce5175f135bcc64f (patch) | |
| tree | ca442937ceeb63461012b33a4576e9835099f106 /thirdparty/blake3/Cargo.toml | |
| parent | get oplog attachments (#622) (diff) | |
| download | zen-24e43a913f29ac3b314354e8ce5175f135bcc64f.tar.xz zen-24e43a913f29ac3b314354e8ce5175f135bcc64f.zip | |
switch to xmake for package management (#611)
This change removes our dependency on vcpkg for package management, in favour of bringing some code in-tree in the `thirdparty` folder as well as using the xmake build-in package management feature. For the latter, all the package definitions are maintained in the zen repo itself, in the `repo` folder.
It should now also be easier to build the project as it will no longer depend on having the right version of vcpkg installed, which has been a common problem for new people coming in to the codebase. Now you should only need xmake to build.
* Bumps xmake requirement on github runners to 2.9.9 to resolve an issue where xmake on Windows invokes cmake with `v144` toolchain which does not exist
* BLAKE3 is now in-tree at `thirdparty/blake3`
* cpr is now in-tree at `thirdparty/cpr`
* cxxopts is now in-tree at `thirdparty/cxxopts`
* fmt is now in-tree at `thirdparty/fmt`
* robin-map is now in-tree at `thirdparty/robin-map`
* ryml is now in-tree at `thirdparty/ryml`
* sol2 is now in-tree at `thirdparty/sol2`
* spdlog is now in-tree at `thirdparty/spdlog`
* utfcpp is now in-tree at `thirdparty/utfcpp`
* xmake package repo definitions is in `repo`
* implemented support for sanitizers. ASAN is supported on windows, TSAN, UBSAN, MSAN etc are supported on Linux/MacOS though I have not yet tested it extensively on MacOS
* the zencore encryption implementation also now supports using mbedTLS which is used on MacOS, though for now we still use openssl on Linux
* crashpad
* bumps libcurl to 8.11.0 (from 8.8.0) which should address a rare build upload bug
Diffstat (limited to 'thirdparty/blake3/Cargo.toml')
| -rw-r--r-- | thirdparty/blake3/Cargo.toml | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/thirdparty/blake3/Cargo.toml b/thirdparty/blake3/Cargo.toml new file mode 100644 index 000000000..25ab3451d --- /dev/null +++ b/thirdparty/blake3/Cargo.toml @@ -0,0 +1,135 @@ +[package] +name = "blake3" +version = "1.8.2" +authors = ["Jack O'Connor <[email protected]>", "Samuel Neves"] +description = "the BLAKE3 hash function" +repository = "https://github.com/BLAKE3-team/BLAKE3" +license = "CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception" +documentation = "https://docs.rs/blake3" +readme = "README.md" +edition = "2021" + +[features] +default = ["std"] + +# The NEON implementation does not participate in dynamic feature detection, +# which is currently x86-only. If "neon" is on, NEON support is assumed. Note +# that AArch64 always supports NEON, but support on ARMv7 varies. The NEON +# implementation uses C intrinsics and requires a C compiler. +neon = [] + +# The Wasm SIMD implementation does not participate in dynamic feature detection, +# which is currently x86-only. If "wasm_simd" is on, Wasm SIMD support is assumed. +# Note that not all Wasm implementations support the Wasm SIMD specification. +# This may become the default in the future. +wasm32_simd = [] + +# This crate uses libstd for std::io trait implementations, and also for +# runtime CPU feature detection. This feature is enabled by default. If you use +# --no-default-features, the only way to use the SIMD implementations in this +# crate is to enable the corresponding instruction sets statically for the +# entire build, with e.g. RUSTFLAGS="-C target-cpu=native". +std = [] + +# The `rayon` feature (disabled by default, but enabled for docs.rs) adds the +# `update_rayon` and (in combination with `mmap` below) `update_mmap_rayon` +# methods, for multithreaded hashing. However, even if this feature is enabled, +# all other APIs remain single-threaded. +# +# Implementation detail: We take a dependency on rayon-core instead of rayon, +# because it builds faster and still includes all the APIs we need. +rayon = ["dep:rayon-core"] + +# The `mmap` feature (disabled by default, but enabled for docs.rs) adds the +# `update_mmap` and (in combination with `rayon` above) `update_mmap_rayon` +# helper methods for memory-mapped IO. +mmap = ["std", "dep:memmap2"] + +# Implement the zeroize::Zeroize trait for types in this crate. +zeroize = ["dep:zeroize", "arrayvec/zeroize"] + +# This crate implements traits from the RustCrypto project, exposed here as the +# "traits-preview" feature. However, these traits aren't stable, and they're +# expected to change in incompatible ways before they reach 1.0. For that +# reason, this crate makes no SemVer guarantees for this feature, and callers +# who use it should expect breaking changes between patch versions of this +# crate. (The "*-preview" feature name follows the conventions of the RustCrypto +# "signature" crate.) +traits-preview = ["dep:digest"] + +# ---------- 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. + +# It wasn't originally intended to expose "digest" as its own feature, but the +# traits-preview feature above predated the "dep:" syntax in Cargo. Version +# 1.5.2 of this crate started using "dep:" syntax, but that broke some callers +# in the wild (https://solana.stackexchange.com/q/17787/29050). This feature +# unbreaks those callers. When Cargo gains the ability to deprecate features, +# this feature will be deprecated. Note that the relevant trait implementations +# are still gated by "traits-preview". +digest = ["dep:digest"] + +# 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.) And by default on 32-bit +# x86, this crate uses Rust intrinsics implementations for SSE4.1 and AVX2, and +# a C intrinsics implementation for AVX-512. In both cases, 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 = [] + +# As described above, on x86_64 this crate use assembly implementations by +# default. Enabling the "prefer_intrinsics" feature makes this crate use +# intrinsics implementations on both 32-bit and 64-bit x86, again for testing +# purposes. +prefer_intrinsics = [] + +# Disable individual instruction sets. CI testing uses these flags to simulate +# different levels of hardware SIMD support. Note that code for the +# corresponding instruction set is still compiled; only detection is disabled. +# +# As noted above, these flags are *for testing only* and are not stable. It's +# possible that some users might find that their particular use case performs +# better if e.g. AVX-512 is disabled, because of issues like CPU downclocking. +# If that comes up, and if disabling the instruction set here at the feature +# level turns out to be the right approach, then we can design a stable +# feature. Until then, we reserve the right to break these features in a patch +# release. +no_sse2 = [] +no_sse41 = [] +no_avx2 = [] +no_avx512 = [] +no_neon = [] + +[package.metadata.docs.rs] +# Document the rayon/mmap methods and the Serialize/Deserialize/Zeroize impls on docs.rs. +features = ["mmap", "rayon", "serde", "zeroize"] + +[dependencies] +arrayref = "0.3.5" +arrayvec = { version = "0.7.4", default-features = false } +constant_time_eq = { version = "0.3.1", default-features = false } +cfg-if = "1.0.0" +digest = { version = "0.10.1", features = ["mac"], optional = true } +memmap2 = { version = "0.9", optional = true } +rayon-core = { version = "1.12.1", optional = true } +serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } +zeroize = { version = "1", default-features = false, optional = true } + +[dev-dependencies] +hmac = "0.12.0" +hex = "0.4.2" +page_size = "0.6.0" +rand = "0.9.0" +rand_chacha = "0.9.0" +reference_impl = { path = "./reference_impl" } +tempfile = "3.8.0" +serde_json = "1.0.107" +ciborium = "0.2.2" + +[build-dependencies] +cc = "1.1.12" |