1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-06 12:56:08 +02:00
BLAKE3/Cargo.toml
Jack O'Connor 4d6dfc4eed version 1.1.0
Changes since 1.0.0:
- The NEON implementation is now enabled by default on AArch64 targets.
  Previously it was disabled without the "neon" Cargo feature in Rust or
  the "BLAKE3_USE_NEON=1" preprocessor flag in C. This is still the case
  on ARM targets other than AArch64, because of the lack of dynamic CPU
  feature detection on ARM. Contributed by @rsdy.
- The previous change leads to some build incompatibilities,
  particularly in C. If you build the C implementation for AArch64
  targets, you now need to include blake3_neon.c, or else you'll get a
  linker error like "undefined reference to `blake3_hash_many_neon'". If
  you don't want the NEON implementation, you need to explicitly set
  "BLAKE3_USE_NEON=0". On the Rust side, AArch64 targets now require the
  C toolchain by default. build.rs includes workarounds for missing or
  very old C compilers for x86, but it doesn't currently include such
  workarounds for AArch64. If we hear about build breaks related to
  this, we can add more workarounds as appropriate.
- C-specific Git tags ("c-0.3.7" etc.) have been removed, and all the
  projects in this repo (Rust "blake3", Rust "b3sum", and the C
  implementation) will continue to be versioned in lockstep for the
  foreseeable future.
2021-10-21 17:23:51 -04:00

100 lines
4.1 KiB
INI

[package]
name = "blake3"
version = "1.1.0"
authors = ["Jack O'Connor <oconnor663@gmail.com>"]
description = "the BLAKE3 hash function"
repository = "https://github.com/BLAKE3-team/BLAKE3"
license = "CC0-1.0 OR Apache-2.0"
documentation = "https://docs.rs/blake3"
readme = "README.md"
edition = "2018"
[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 = []
# 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 = ["digest/std"]
# The "rayon" feature (defined below as an optional dependency) enables the
# `Hasher::update_rayon` method, for multithreaded hashing. However, even if
# this feature is enabled, all other APIs remain single-threaded.
# 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 = ["digest", "crypto-mac"]
# ---------- Features below this line are for internal testing only. ----------
# 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 downlocking.
# 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 Hasher::update_rayon on docs.rs.
features = ["rayon"]
[dependencies]
arrayref = "0.3.5"
arrayvec = { version = "0.7.0", default-features = false }
constant_time_eq = "0.1.5"
rayon = { version = "1.2.1", optional = true }
cfg-if = "1.0.0"
digest = { version = "0.9.0", optional = true }
crypto-mac = { version = "0.11.0", optional = true }
[dev-dependencies]
hex = "0.4.2"
page_size = "0.4.1"
rand = "0.8.0"
rand_chacha = "0.3.0"
reference_impl = { path = "./reference_impl" }
[build-dependencies]
cc = "1.0.4"