aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-06-01fill in the template line for LICENSE_A2LLVMJack O'Connor
2024-05-31licencesJP
2024-05-31multilicensing for LLVMJP
2024-04-07fix Windows ARM64 build and detect ARM64EC as ARM64Javier Blazquez
2024-03-20format the state matrix better in reference_impl.rsJack O'Connor
2024-03-12Fix missing LICENSE file in b3sum crateBenjamin A. Beasley
Add a symbolic link to the top-level license file; this is dereferenced by cargo publish, and the LICENSE appears as a regular file in the published crate.
2024-03-12version 1.5.11.5.1Jack O'Connor
Changes since 1.5.0: - The Rust crate is now compatible with Miri. - ~1% performance improvement on Arm NEON contributed by @divinity76 (#384). - Various fixes and improvements in the CMake build. - The MSRV of b3sum is now 1.74.1. (The MSRV of the library crate is unchanged, 1.66.1.)
2024-03-12optimize neon loadu_128/storeu_128 (#384)divinity76
vld1q_u8 and vst1q_u8 has no alignment requirements. This improves performance on Oracle Cloud's VM.Standard.A1.Flex by 1.15% on a 16*1024 input, from 13920 nanoseconds down to 13800 nanoseconds (approx)
2024-03-10test_miri_smoketestJack O'Connor
2024-03-09avoid using NamedTempFile under MiriJack O'Connor
2024-03-09avoid using constant_time_eq under MiriJack O'Connor
2024-03-09Support running inside miriRyo Onodera
2024-02-04comment cleanupJack O'Connor
2024-02-04silenc gcc Werror=logical-opdivinity76
``` /home/travis/build/php/php-src/ext/hash/blake3/upstream_blake3/c/blake3.c: In function ‘compress_subtree_to_parent_node’: /home/travis/build/php/php-src/ext/hash/blake3/upstream_blake3/c/blake3.c:354:22: error: logical ‘and’ of mutually exclusive tests is always false [-Werror=logical-op] 354 | while (num_cvs > 2 && num_cvs <= MAX_SIMD_DEGREE_OR_2) { | ^~ cc1: all warnings being treated as errors make: *** [Makefile:1910: ext/hash/blake3/upstream_blake3/c/blake3.lo] Error 1 ``` Fixes https://github.com/BLAKE3-team/BLAKE3/issues/379. Closes https://github.com/BLAKE3-team/BLAKE3/pull/380.
2024-01-28Tekken 8 https://twitter.com/rodarmor/status/1751567502050771189JP
2024-01-21add a guts docs exampleguts_0.0.0Jack O'Connor
2024-01-21guts readme updatesJack O'Connor
2024-01-21add guts testing to CIJack O'Connor
2024-01-21configure no_std for guts, but not for testingJack O'Connor
2024-01-21factor out just the portable parts of the guts_api branchJack O'Connor
2024-01-21update memmap2 to v0.9Jack O'Connor
2023-12-30replace unmaintained actions-rs/toolchain action in CIDirk Stolle
Basically all of the `actions-rs/*` actions are unmaintained. See <https://github.com/actions-rs/toolchain/issues/216> for more information. Due to their age they generate several warnings in CI runs. To get rid of those warnings the occurrences of `actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`.
2023-12-28update actions/checkout in GitHub Actions to v4Dirk Stolle
2023-12-08add Bazel to the list of users in the readmeJack O'Connor
2023-12-02build(CMake): Require C99 modeHenrik S. Gaßmann
Specify language requirement as a [compile-feature] and force compiler extensions off ensuring portability problems are detected early on. Note that we do not use the `C_STANDARD` property, because it doesn't propagate to dependent targets and would prohibit users from compiling their code base with consistent flags / language configuations if they were to target a newer C standard. Similarly we do not configure `C_STANDARD_REQUIRED` as [compile-features] do not interact with it--they are enforced regardless. [compile-feature]: https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html#compile-feature-requirements
2023-11-05add the compiler name to CMake CI jobsJack O'Connor
2023-11-05Fix CMake target include directories if library is used with ↵Viacheslav H
add_subdirectory or FetchContent
2023-11-05Fix Windows build with clang-clRui Ueyama
clang-cl is LLVM's MSVC-compatible compiler frontend for Windows ABI. If clang-cl is in use, `CMAKE_C_COMPILER_ID` is `Clang` even though it doesn't take Unix-like command line options but MSVC-like options. `if(MSVC)` is the correct predicate to check if we should pass MSVC-ish command line options.
2023-10-31style: Exclude whitespace fixups from git blameHenrik Gaßmann
2023-10-31style: Remove trailing whitespace in CMakeLists.txtHenrik Gaßmann
2023-10-31build(CMake): Provide NEON cflags for ARMv8 32bitHenrik Gaßmann
ARMv8 CPUs are guaranteed to support NEON instructions. However, for 32bit ARMv8 triplets GCC needs to explicitly be configured to enable NEON intrinsics.
2023-10-02build(CMake): Apply PP definitions to all sourcesHenrik Gaßmann
2023-10-02allow(unreachable_code) in all the *_detected functionsJack O'Connor
Previously we only disabled these warnings for SSE2, which is assumed enabled on x86-64, but it looks like new nightly compilers are also assuming SSE4.1 on macOS. Disabling these warnings across all the detection functions accounts for that, and it also gets rid of some warnings that you'd see if you used RUSTFLAGS='-C target-cpu=native'.
2023-09-20version 1.5.01.5.0Jack O'Connor
Changes since 1.4.1: - The Rust crate's Hasher type has gained new helper methods for common forms of IO: update_reader, update_mmap, and update_mmap_rayon. The latter matches the default behavior of b3sum. The mmap methods are gated by the new "mmap" Cargo feature. - Most of the Rust crate's public types now implement the Zeroize trait. This is gated by the new "zeroize" Cargo feature. - The Rust crate's Hash types now implements the serde Serialize and Deserialize traits. This is gated by the new "serde" Cargo feature. - The C library now uses atomics to cache detected CPU features under most compilers other than MSVC. Previously this was a non-atomic write, which was probably "benign" but made TSan unhappy. - NEON support is now disabled by default on big-endian AArch64. Previously this was a build error if the caller didn't explicitly disable it.
2023-09-19add a test for the new serde featureJack O'Connor
2023-09-19Add serde support for Hash behind optional featureRalph Minderhoud
Added a new cargo feature `serde` that when enabled will derive `serde::Serialize` and `serde::Deserialize` for the `blake3::Hash` struct.
2023-09-19don't default to NEON intrinsics in build.rs for big-endian targetsJack O'Connor
2023-09-19c/blake3_impl.h: don't try to do NEON on big-endian aarch64.Havard Eidnes
...because this would otherwise hit #error "This implementation only supports little-endian ARM." in c/blake3_neon.c.
2023-09-19minor cleanup in Hasher docsJack O'Connor
2023-09-16make update_reader/mmap/mmap_rayon return selfJack O'Connor
This makes them consistent with how the existing update() and update_rayon() methods work, with the difference being that it's it's io::Result<&mut Self> instead of just &mut Self.
2023-09-16replace the new file module with inherent methods on HasherJack O'Connor
New methods: - update_reader - update_mmap - update_mmap_rayon These are more discoverable, more convenient, and safer. There are two problems I want to avoid by taking a `Path` instead of a `File`. First, exposing `Mmap` objects to the caller is fundamentally unsafe, and making `maybe_mmap_file` private avoids that issue. Second, taking a `File` raises questions about whether memory mapped reads should behave like regular file reads. (Should they respect the current seek position? Should they update the seek position?) Taking a `Path` from the caller and opening the `File` internally avoids these questions.
2023-09-16move file operations from b3sum to blake3Banyc
2023-09-16document the `zeroize` Cargo featureJack O'Connor
As part of this change, I don't think we need the `zeroize_crate` workaround anymore if we use the relateively new `dep:` syntax in Cargo.toml.
2023-09-10stop using MIPS for big-endian testingJack O'Connor
https://twitter.com/burntsushi5/status/1695483429997945092 https://github.com/rust-lang/compiler-team/issues/648
2023-09-10update the MSRV for b3sum to 1.70.0Jack O'Connor
As usual, the driver here is the MSRV of clap. I should've checked this when I updated the Cargo.lock file.
2023-09-10fix a build break in the blake3_c testsJack O'Connor
2023-09-10update dev-dependenciesJack O'Connor
2023-07-21blake3_dispatch: Fix race condition initializing g_cpu_features.Javier Blazquez
If multiple threads try to compute a hash simultaneously before the library has been used for the first time, the logic in get_cpu_features that detects CPU features will write to g_cpu_features without synchronization, which is a race condition and flagged by ThreadSanitizer. This change marks g_cpu_features as an atomic variable to address the race condition.
2023-07-16Remove unneeded digest/std in std featureElichai Turkel
2023-07-16Add tests for ZeroizeElichai Turkel