Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ types:
- chore
- revert

targetUrl: https://github.com/fast/rache/blob/main/.github/semantic.yml
targetUrl: https://github.com/fast/hashcrew/blob/main/.github/semantic.yml
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Run release-profile library tests under Miri
# Release mode disables debug assertions that could otherwise mask an
# unsafe precondition violation before Miri observes it.
run: cargo miri test --package rache --lib --no-default-features --release
run: cargo miri test --package hashcrew --lib --no-default-features --release

target:
name: Target (${{ matrix.name }})
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
key: ${{ matrix.target }}

- name: Check target
run: cargo check --package rache --target "${{ matrix.target }}" --locked ${{ matrix.features }}
run: cargo check --package hashcrew --target "${{ matrix.target }}" --locked ${{ matrix.features }}

package:
name: Package
Expand All @@ -189,7 +189,7 @@ jobs:
- name: Validate package contents
shell: bash
run: |
package_files="$(cargo package --package rache --locked --list)"
package_files="$(cargo package --package hashcrew --locked --list)"
for required in Cargo.lock Cargo.toml README.md LICENSE THIRD_PARTY_NOTICES.md src/lib.rs; do
grep -Fxq "$required" <<< "$package_files" || {
echo "missing required package file: $required" >&2
Expand All @@ -202,12 +202,12 @@ jobs:
fi

- name: Build package
run: cargo package --package rache --locked
run: cargo package --package hashcrew --locked

- name: Test package
shell: bash
run: |
package_dir="$(find target/package -mindepth 1 -maxdepth 1 -type d -name 'rache-*' -print -quit)"
package_dir="$(find target/package -mindepth 1 -maxdepth 1 -type d -name 'hashcrew-*' -print -quit)"
test -n "$package_dir"
cargo test --manifest-path "$package_dir/Cargo.toml" --all-features --locked
cargo test --manifest-path "$package_dir/Cargo.toml" --no-default-features --locked
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Use `cargo x` as the source of truth for repository workflows. Read `cargo x --h

## Rust Style

Keep the publishable `rache` crate dependency-free, `no_std` compatible, and allocation-free. Isolate architecture-specific unsafe code in the XXH3 kernel layer and preserve a scalar implementation for every accelerated path.
Keep the publishable `hashcrew` crate dependency-free, `no_std` compatible, and allocation-free. Isolate architecture-specific unsafe code in the XXH3 kernel layer and preserve a scalar implementation for every accelerated path.

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Architecture

`rache` separates its public API, portable algorithm cores, and optional hardware kernels:
`hashcrew` separates its public API, portable algorithm cores, and optional hardware kernels:

```text
public API
Expand All @@ -19,7 +19,7 @@ Configuration follows the source algorithm rather than a synthetic common interf

CityHash remains a one-shot family. The reference algorithm incorporates the complete input length and reads its tail relative to the end of the message; bounded-memory state cannot derive the final digest from independently hashed chunks. `CityHash128` values store the reference high word in the most significant half and the low word in the least significant half.

The individual xxHash variants and hardware kernel are nested under `rache::xxhash`; no compatibility modules are re-exported at the crate root.
The individual xxHash variants and hardware kernel are nested under `hashcrew::xxhash`; no compatibility modules are re-exported at the crate root.

## Streaming state

Expand Down
30 changes: 5 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
# Changelog

## 0.2.0

- Remove duplicate crate-root, `raw`, and nested xxHash variant paths so each public API has one family-qualified home. Import functions, states, builders, constants, and kernels from `rache::{cityhash, fnv, murmur, xxhash}`; for example, replace `rache::Xxh3` or `rache::xxhash::xxh3::Xxh3` with `rache::xxhash::Xxh3_64`, `rache::raw::xxh3_64` with `rache::xxhash::xxh3_64`, and `rache::kernel` with `rache::xxhash::kernel`.
- Remove redundant alternate entry points so each operation has one public name. Use the module-level functions for complete input, replace `murmur3_128` and `Murmur3_128` with the architecture-qualified `murmur3_x64_128` and `Murmur3X64_128`, and replace the 128-bit states' `finish_128` methods with `digest`.
- Complete the original MurmurHash3 family with allocation-free one-shot and streaming APIs named after the reference variants: `murmur3_x86_32` and `Murmur3X86_32`, `murmur3_x86_128` and `Murmur3X86_128`, and `murmur3_x64_128` and `Murmur3X64_128`.
- Allow custom-secret XXH3 streaming states and builders to own caller-provided storage while preserving borrowed-secret construction and allocation-free hashing. Code that explicitly named `Xxh3_64SecretBuilder<'a>` must use the storage type `Xxh3_64SecretBuilder<&'a [u8]>`; constructor calls with inferred types continue to work.
- Implement `std::io::Write` for every streaming hash state when the default `std` feature is enabled, allowing file and network hashing through `std::io::copy`, `Write::write`, or `Write::write_all`. The inherent 128-bit state `write` aliases have been removed so they do not shadow the trait method; use `update` for direct incremental input.
- Cache the derived secret in seeded `Xxh3_64Builder` values so hash collections do not repeat 192-byte seed expansion for every key.
- Improve one-shot XXH3-64 and XXH3-128 throughput for 17-to-128-byte inputs by ensuring the specialized medium-length paths are inlined.

## 0.1.0

- Add compatible XXH32, XXH64, XXH3-64, and XXH3-128 implementations.
- Add CityHash32, CityHash64, CityHash128, seeded variants, and the public 128-to-64 reducer as allocation-free one-shot APIs.
- Add MurmurHash3 x86_32 and x64_128 one-shot and streaming implementations.
- Add FNV-1a 32 and FNV-1a 64 one-shot and streaming implementations.
- Add reference-compatible XXH3 custom-secret and seed+secret raw, streaming, and `BuildHasher` APIs without allocation.
- Add FNV-1a custom offset-basis raw, streaming, and `BuildHasher` APIs.
- Add allocation-free raw and streaming APIs plus standard hashing adapters.
- Add scalar, little-endian AArch64 NEON, x86-64 SSE2, and x86-64 AVX2 XXH3 kernels.
- Optimize NEON stripe accumulation and instruction scheduling, plus buffered streaming writes that do not yet require kernel work.
- Add `no_std` support, randomized cross-implementation and per-backend tests, specification vectors, and one-shot/streaming comparison benchmarks.
- Add exhaustive short-input and two-way streaming partition tests, optimized CI coverage for MSRV and representative targets, and a reproducible package release gate.
- Harden XXH streaming state across 64-bit length-counter wraparound and avoid secret-size arithmetic overflow in XXH3 long-input one-shot hashing.
- Clarify that cross-platform digest stability applies to identical raw byte streams rather than Rust's native typed `Hash` encoding.
- Adopt the Apache License 2.0 and enforce source headers and Conventional Commit pull-request titles in CI.
- Group implementations by algorithm family while preserving crate-root xxHash module paths.
- Provide dependency-free, allocation-free, and `no_std`-compatible implementations of CityHash32, CityHash64, CityHash128, XXH32, XXH64, XXH3-64, XXH3-128, all three reference MurmurHash3 variants, and FNV-1a 32 and 64.
- Group each algorithm family under `hashcrew::{cityhash, xxhash, murmur, fnv}` with one-shot functions for complete byte slices, bounded-memory streaming states where the algorithm permits them, and matching `Hasher` and `BuildHasher` adapters for 32-bit and 64-bit states.
- Support seeded and custom-secret XXH3, seeded CityHash, seeded MurmurHash3, custom FNV offset bases, and caller-owned or borrowed XXH3 secret storage without allocation.
- Accelerate long-input XXH3 with scalar, little-endian AArch64 NEON, x86-64 SSE2, and x86-64 AVX2 kernels selected from target features and cached runtime detection where available.
- Integrate streaming states with `std::io::Write` under the default `std` feature while keeping direct `update` and `digest` APIs available in every build.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

[workspace]
members = ["benchmarks", "examples", "rache", "tests-integration", "xtask"]
members = ["benchmarks", "examples", "hashcrew", "tests-integration", "xtask"]
resolver = "3"

[workspace.package]
Expand All @@ -24,7 +24,7 @@ rust-version = "1.85"

[workspace.dependencies]
# Workspace dependencies
rache = { path = "rache" }
hashcrew = { path = "hashcrew" }

# Crates.io dependencies
cityhash-rs = { version = "1.0.1" }
Expand Down
11 changes: 0 additions & 11 deletions HISTORY.md

This file was deleted.

Loading