diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d579274..219ae76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,7 +210,12 @@ jobs: - name: Test package shell: bash run: | - package_dir="$(find target/package -mindepth 1 -maxdepth 1 -type d -name 'hashcrew-*' -print -quit)" - test -n "$package_dir" + package_dir="$(cargo metadata --format-version 1 --no-deps | jq -er ' + .target_directory as $target + | .packages[] + | select(.name == "hashcrew") + | "\($target)/package/\(.name)-\(.version)" + ')" + test -f "$package_dir/Cargo.toml" cargo test --manifest-path "$package_dir/Cargo.toml" --all-features --locked cargo test --manifest-path "$package_dir/Cargo.toml" --no-default-features --locked diff --git a/CHANGELOG.md b/CHANGELOG.md index c4bd0d1..1539635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## Unreleased +## v0.1.2 (2026-09-07) + * Improve XXH64 streaming throughput for short chunks on affected toolchains. * Include upstream copyright notices and license terms for incorporated hash implementations in source distributions, with third-party terms consolidated in `LICENSE`. diff --git a/Cargo.lock b/Cargo.lock index 42355ec..874e19b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -193,7 +193,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "hashcrew" -version = "0.1.1" +version = "0.1.2" [[package]] name = "heck" diff --git a/README.md b/README.md index 5832a8b..c2a4e70 100644 --- a/README.md +++ b/README.md @@ -171,22 +171,24 @@ Target-guaranteed CPU features are selected at compile time. Other `std` builds Runnable examples live in the [`examples`](examples) workspace crate. The [`benchmarks`](benchmarks) crate contains one-shot and streaming comparisons with independent implementations; see its [benchmark guide](benchmarks/README.md) for filters, input sizes, and the complete case matrix. -Use the repository workflow commands to run them: +Repository workflows use the active Rust toolchain. `cargo x lint` selects nightly for Clippy and rustfmt; its rustdoc check uses the active toolchain. Use `cargo x --help` to list the workflows, or run tests and benchmarks with: ```shell cargo x test cargo x bench ``` +See the [release guide](RELEASE.md) for checks on stable and the MSRV. + ## Correctness Integration tests compare CityHash, xxHash, and MurmurHash3 with independent implementations, and verify FNV-1a against RFC vectors plus an independent 64-bit implementation. The suite covers boundary lengths, multiple seeds, custom secrets, custom FNV offset bases, randomized inputs, streaming partitions, available hardware backends, and both `std` and `no_std` builds. -## Minimum Supported Rust Version (MSRV) +## Minimum Rust version policy -This crate is built against the latest stable release, and its minimum supported rustc version is 1.85.0. +This crate's minimum supported `rustc` version is `1.85.0`. -The policy is that the minimum Rust version required to use this crate can be increased in minor version updates. For example, if Asyncband 1.0 requires Rust 1.20.0, then Asyncband 1.0.z for all values of z will also require Rust 1.20.0 or newer. However, Asyncband 1.y for y > 0 may require a newer minimum version of Rust. +The current policy is that the minimum Rust version required to use this crate can be increased in minor version updates. For example, if `crate 1.0` requires Rust 1.85.0, then `crate 1.0.z` for all values of `z` will also require Rust 1.85.0 or newer. However, `crate 1.y` for `y > 0` may require a newer minimum version of Rust. ## License and acknowledgements diff --git a/RELEASE.md b/RELEASE.md index 4a136fc..6fc5e1c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,32 +4,33 @@ Only the `hashcrew` workspace package is published. Benchmarks, examples, and in ## Preflight -1. Work from a clean commit on the default branch. -2. Update the crate version and `CHANGELOG.md`. +1. Prepare a release PR that updates the crate version, `Cargo.lock`, and `CHANGELOG.md`. +2. After the PR is merged, work from a clean, up-to-date checkout of `main`. 3. Run the release-comparison inputs in the [benchmark guide](benchmarks/README.md) when performance-relevant code changed. 4. Require every CI job to pass. -Run the local release gate: +Select stable once for this release session. The commands below inherit it; `cargo x lint` selects nightly for Clippy and rustfmt, and `cargo +1.85.0 x test` checks the MSRV: ```shell +export RUSTUP_TOOLCHAIN=stable cargo x lint cargo x check +cargo x build --locked cargo x test -RUSTUP_TOOLCHAIN=1.85.0 cargo x test -cargo x bench --no-run -release_version=0.1.0 -cargo release "$release_version" --package hashcrew +cargo +1.85.0 x test +cargo release --package hashcrew ``` -The `cargo release` command is a dry run unless `--execute` is present. Inspect `cargo +stable package -p hashcrew --locked --list` before publishing. The archive must contain `LICENSE` with the applicable third-party terms, README, manifest, lockfile, and library sources, without workspace benchmarks or integration-test fixtures. The crate's `LICENSE` is a symbolic link to the root license. Update the root file and check its entries against the source-file attributions when incorporating or updating third-party code. +The `cargo release` command is a dry run unless `--execute` is present. Inspect `cargo package --package hashcrew --locked --list` before publishing. The archive must contain `LICENSE` with the applicable third-party terms, README, manifest, lockfile, and library sources, without workspace benchmarks or integration-test fixtures. The crate's `LICENSE` is a symbolic link to the root license. Update the root file and check its entries against the source-file attributions when incorporating or updating third-party code. ## Publish -Confirm the crate name, version, repository URL, and crates.io account before the irreversible step: +Continue in the same shell with stable selected. Confirm the crate name, version, repository URL, and crates.io account before the irreversible step: ```shell -release_version=0.1.0 -cargo release "$release_version" --package hashcrew --execute +git switch main +git pull --ff-only origin main +cargo release --package hashcrew --execute ``` -This publishes the crate, creates the configured signed `v` tag, and pushes the branch and tag. Do not create a second tag manually. After crates.io confirms the release, verify the crate page and docs.rs build. +Omitting a version argument releases the stable version already recorded in the manifest. This publishes the crate, creates the configured signed `v` tag, and pushes the branch and tag. Do not create a second tag manually. After crates.io confirms the release, verify the crate page and docs.rs build. diff --git a/hashcrew/Cargo.toml b/hashcrew/Cargo.toml index 0a160b1..fce3af1 100644 --- a/hashcrew/Cargo.toml +++ b/hashcrew/Cargo.toml @@ -20,7 +20,7 @@ homepage = "https://github.com/fast/hashcrew" keywords = ["hash", "xxhash", "cityhash", "murmurhash", "fnv"] name = "hashcrew" repository = "https://github.com/fast/hashcrew" -version = "0.1.1" +version = "0.1.2" edition.workspace = true license.workspace = true