PackageTrack
Sign in Get early access

rapidhash

An extremely fast, high quality, platform-independent hashing algorithm.

4.5.1 28M downloads/mo #1725 most downloaded on crates.io hoxxep/rapidhash

What this package is like to depend on

Last release 1 months ago

03 Jul 2026

Release timing varies

gaps range from 1 weeks to 5 months

Nearly every release is documented

notes for 23 of 23 stable releases

Nothing withdrawn

no release was ever pulled

2 years old

23 releases · first in 2024

11 releases in the last 12 months

see the full history below

Release timeline

23 releases · Sep 2024 to Jul 2026
2025 2026
Release Pre-release

Releases

latest 23
  1. 4.5.1 03 Jul 2026
    Release notes

    What's Changed

    • Fix size tests for s390x architectures with 8-byte alignment for u128 by @hoxxep in #101
    • Fix new thread seeding for std but no-atomic targets by @hoxxep in #102

    Full Changelog: v4.5.0...v4.5.1

    Open source →
    Release notes

    Fixes

    • Fixed an edge case where targets with std but no atomics could see the same seed repeatedly on RandomState on new threads. (https://github.com/hoxxep/rapidhash/pull/102)
    • Fixed struct size tests for Debian packaging. (https://github.com/hoxxep/rapidhash/issues/90)
    Open source →
  2. 4.5.0 03 Jul 2026
    Release notes

    Deprecations

    • The rand feature has been deprecated in favor of getrandom_04 and getrandom_03.
    • The rng feature has been deprecated in favor of the rapidrand crate.

    Additions

    • getrandom_04 feature: opt-in seeding of the hasher seeds and secrets from OS/platform entropy via the getrandom crate, without requiring std nor rand crate. This replaces the rand feature and enables true HashDoS resistance on targets with no ambient entropy or ASLR:
      • wasm32-wasip1/wasm32-wasip2: enabling the feature is sufficient; entropy comes from the WASI host.
      • wasm32-unknown-unknown (browser/node): additionally requires getrandom's wasm_js backend, enabled by the top-level binary. Building without the backend is a compile error rather than a silent fallback to deterministic seeding.
      • Embedded/no_std targets with a hardware RNG: register a getrandom custom backend. On targets without atomic pointer support (e.g. thumbv6m-none-eabi), each RandomState draws a fresh random seed per instance, restoring minimal HashDoS resistance where there previously was none.
    • getrandom_03 feature: the same as the getrandom_04 feature, but using getrandom v0.3 to preserve the rapidhash MSRV 1.71.

    Fixes

    • RandomState no longer produces duplicate seeds across threads whose stacks are recycled by the OS. Each thread's seed counter is now initialized from a global thread counter mixed with the process-wide random seed, instead of relying on the (frequently re-used) stack address alone.
    • Better randomness handling and documentation for wasm targets, no_std targets, and targets without atomics.

    What's Changed

    • Overhaul RandomState and GlobalState entropy logic by @hoxxep in #98
    • Deprecate RapidRng in favour of rapidrand by @hoxxep in #99

    Full Changelog: v4.4.2...v4.5.0

    Open source →
    Release notes

    Deprecations

    • The rand feature has been deprecated in favor of getrandom_04 and getrandom_03.
    • The rng feature has been deprecated in favor of the rapidrand crate.

    Additions

    • getrandom_04 feature: opt-in seeding of the hasher seeds and secrets from OS/platform entropy via the getrandom crate, without requiring std nor rand crate. This replaces the rand feature and enables true HashDoS resistance on targets with no ambient entropy or ASLR:
      • wasm32-wasip1/wasm32-wasip2: enabling the feature is sufficient; entropy comes from the WASI host.
      • wasm32-unknown-unknown (browser/node): additionally requires getrandom's wasm_js backend, enabled by the top-level binary. Building without the backend is a compile error rather than a silent fallback to deterministic seeding.
      • Embedded/no_std targets with a hardware RNG: register a getrandom custom backend. On targets without atomic pointer support (e.g. thumbv6m-none-eabi), each RandomState draws a fresh random seed per instance, restoring minimal HashDoS resistance where there previously was none.
    • getrandom_03 feature: the same as the getrandom_04 feature, but using getrandom v0.3 to preserve the rapidhash MSRV 1.71.

    Fixes

    • RandomState no longer produces duplicate seeds across threads whose stacks are recycled by the OS. Each thread's seed counter is now initialized from a global thread counter mixed with the process-wide random seed, instead of relying on the (frequently re-used) stack address alone.
    • Better randomness handling and documentation for wasm targets, no_std targets, and targets without atomics.
    Open source →
  3. 4.4.2 27 Jun 2026
    Release notes

    What's Changed

    • Add 32-bit tests and test fixes by @hoxxep in #94
    • Update readme to include used by note by @hoxxep in #95
    • Fix documentation errors, link seed-independent collision article by @hoxxep in #96

    Full Changelog: v4.4.1...v4.4.2

    Open source →
    Release notes

    Fixes

    • Fixed documentation errors across the codebase.
    • Fixed unit tests on 32-bit platforms. No library or CLI code changes were required.
    Open source →
  4. 4.4.1 20 Feb 2026
    Release notes

    What's Changed

    • perf: Mark simple RapidSecrets constructors as inline always by @hoxxep in #84

    Full Changelog: v4.4.0...v4.4.1

    Open source →
    Release notes

    Performance

    • Marked simple RapidSecrets constructors as #[inline(always)].
    • Mark get_secrets as #[inline(always)] in seeding.rs.
    Open source →
  5. 4.4.0 16 Feb 2026
    Release notes

    Additions

    • Added v3::RapidStreamHasherV3, an incremental streaming hasher with a write/finish API that mirrors std::hash::Hasher. It deliberately does not implement Hasher directly, ensuring hash output remains stable and portable across platforms and compiler versions. Multiple calls to write will produce the same hash as a single call to rapidhash_v3 with the concatenated input.

    Performance

    • rapidhash_v3_file now uses RapidStreamHasherV3 internally, replacing the old ChunkedStreamReader and significantly improving throughput by avoiding redundant buffer copies for large chunks.

    What's Changed

    • RapidStreamHasherV3 implementation, test, and benchmarks by @hoxxep in #81

    Full Changelog: v4.3.0...v4.4.0

    Open source →
    Release notes

    Additions

    • Added v3::RapidStreamHasherV3, an incremental streaming hasher with a write/finish API that mirrors std::hash::Hasher. It deliberately does not implement Hasher directly, ensuring hash output remains stable and portable across platforms and compiler versions. Multiple calls to write will produce the same hash as a single call to rapidhash_v3 with the concatenated input.

    Performance

    • rapidhash_v3_file now uses RapidStreamHasherV3 internally, replacing the old ChunkedStreamReader and significantly improving throughput by avoiding redundant buffer copies for large chunks.
    Open source →
  6. 4.3.0 08 Feb 2026
    Release notes

    What's Changed

    • Derive Debug for RandomState by @anp in #78
    • Implement a consistent Debug on all inner::state::*_state.rs types by @hoxxep in #79

    Full Changelog: v4.2.2...v4.3.0

    Open source →
    Release notes

    Additions

    • Implemented Debug on RandomState, GlobalState, and SeedableState. (@anp in #78 and @hoxxep in #79)
    Open source →
  7. 4.2.2 05 Feb 2026
    Release notes

    Fixes

    • Symlink license files for rapidhash crate. by @anp in #77

    New Contributors

    • @anp made their first contribution in #77

    Full Changelog: v4.2.1...v4.2.2

    Open source →
    Release notes

    Fixes

    • Include LICENSE files in the published crate. (@anp in https://github.com/hoxxep/rapidhash/pull/77)
    Open source →
  8. 4.2.1 11 Jan 2026
    Release notes

    Fixes

    • Update rapidhash_v3_file docs for clarity and correctness.

    Pull Request

    • Update wasmtime requirement from 39.0.1 to 40.0.0 by @dependabot[bot] in #71
    • Update rapidhash_v3_file docs for clarity and correctness. by @hoxxep in #72

    Full Changelog: v4.2.0...v4.2.1

    Open source →
    Release notes

    Fixes

    • Updated v3::rapidhash_v3_file documentation to better describe the streaming interface.
    Open source →
  9. 4.2.0 20 Dec 2025
    Release notes

    Additions

    • Added GlobalState which initializes a RapidHasher with a global seed and secrets that are randomized once on application start.

    Pull Requests

    Full Changelog: v4.1.1...v4.2.0

    Open source →
    Release notes

    Additions

    • Added GlobalState which initializes a RapidHasher with a global seed and secrets that are randomized once on application start.
    Open source →
  10. 4.1.1 21 Oct 2025
    Release notes

    Fixes

    • Fixed docsrs build flags, replacing doc_auto_cfg with doc_cfg. (#55)
    • Fixed broken docsrs links. (#57)
    Open source →
    Release notes

    Fixes

    • Fixed docsrs build flags, replacing doc_auto_cfg with doc_cfg. (https://github.com/hoxxep/rapidhash/pull/55)
    • Fixed broken docsrs links. (https://github.com/hoxxep/rapidhash/pull/57)
    Open source →
  11. 4.1.0 12 Sep 2025
    Release notes

    Additions

    • Added SeedableState::new and SeedableState::custom to create hasher builders with user-defined seeds and secrets.

    Deprecations

    • SeedableState::with_seed has been deprecated in favour of SeedableState::custom for better naming and improved warnings in the documentation.
    Open source →
  12. 4.0.0 25 Aug 2025
    Release notes

    https://github.com/hoxxep/rapidhash/pull/43

    Breaking changes

    • rapidhash::v3 micro/nano output change: input lengths 5-7 were mismatching the intended C++ V3 output. The C++ rapidhash V3 has been yanked and re-released as V3 to fix the bug, and this rust implementation will follow. This changes the hash outputs for rapidhash_v3_micro_inline and rapidhash_v3_nano_inline for inputs of size 5, 6, and 7 bytes.
    • RapidBuildHasher renamed and refactored to SeedableState.
    • RapidHasher<'s> new lifetime parameter added to support user-defined secrets via SeedableState.
    • RapidHashMap and RapidHashSet moved to crate top level for convenience. The top level uses the fast:: variants, and the quality:: and inner:: hashmaps have been removed. They can still be built manually using inner::RandomState if required. The fast:: collection variants have been deprecated to be removed in a future major release.

    Additions

    • nightly feature which improves str hashing performance by omitting the 0xFF suffix write and adds likely/unlikely hints.
    • SeedableState: a hasher builder which can be seeded with fixed or user-defined secrets. This replaces RapidBuildHasher, but still defaults to random seeds. It is slightly slower than RandomState.

    Performance improvements

    • Bounds check elision: Improved RapidHasher by eliding extra bounds checks in some cases by using assert_unchecked.
    • Likely/unlikely hints: Added stable likely/unlikely hints in various places to ensure small inputs are favoured.

    MSRV

    • MSRV reduced to 1.71.0 from 1.77.0 by removing const usage of first_chunk.
    Open source →
  13. 3.1.0 09 Aug 2025
    Release notes

    Performance improvements

    • Improved RapidHasher small string hashing performance by 1.5-15% depending on the benchmark, by reducing the small string hashing code size and allowing the compiler to inline more. Performance was also improved on big-endian platforms by reading native-endian bytes. The portable hashers (rapidhash::v3 etc. modules) are unaffected by this change. #37

    Fixes

    • Fixed compilation on targets without atomic pointers. #38, #39
    Open source →
  14. 3.0.0 04 Aug 2025
    Release notes

    Big performance improvements, and potentially rust's fastest general-purpose hasher!

    Breaking changes

    • Replaced FNV with a SPONGE configuration with RapidHasher to improve integer and tuple hashing performance.
    • RandomState removed the with_seed and with_seed_and_static_secrets methods to reduce the struct size. Please raise a GitHub issue if you need a SeededState-style hash builder for the in-memory RapidHasher.
    • Added a RapidSecrets type for all versions to generate seeds and secrets for HashDoS-resistant hashing. This makes generating unique seeds/secrets easier for persistent hashing use cases.
      • rapidhash::v* portable hashing functions now all take a &RapidSecrets argument as a seed.
      • For full compatibility with the old integer seeds, instantiate RapidSecrets::seed_cpp(u64) with your integer seed which will continue to use the default secrets.
      • For minimal DoS resistance, use RapidSecrets::seed(u64) to generate a new seed and secrets.
    • RapidHasher removed the old write_const and finish_const methods as they were unlikely to be used and may cause confusion.
    • rapidhash_v*_inner methods have a new AVALANCHE const argument to control whether they should avalanche the output. Setting this to true will match the default hash output and C++ implementation for the highest quality hashing. Turning off avalanching will reduce the hash quality, but improve performance, especially for small inputs.
    • Fixed the rapidhash::v1 V1_BUG argument to actually match the original v1.x.x crate behaviour, which changes the hash output. The if statement was fundamentally wrong in the v2.x.x crate and failing to hash some bytes, apologies. This now has a proper test to prevent future regressions.

    Additions

    • rapidhash::rng::rapidrng_fast_non_portable: a slightly faster, lower-quality RNG that also has optimisations for u32 platforms without wide-arithmetic support. Excellent for generating fixtures in our WASM benchmarks.

    Deprecations

    • The V1 and V2 rapidhash_file methods have been deprecated, with a note to use rapidhash::v3 instead. This is because they aren't streaming-compatible hashing algorithms which may be misleading if someone has not read the documentation in detail. They will continue to be included for the foreseeable future as they provide the CLI functionality.

    Performance improvements

    • RapidHasher significantly improved performance hashing integers, tuples, and integer types using the new SPONGE configuration in both fast and quality modes.
    • RapidHasher now uses a non-portable mixing function for an improvement on platforms with slow wide arithmetic, such as wasm32.
    • rapidhash::v3 has a healthy performance improvement for mid-size input lengths by skipping the 112+ length setup/teardown.
    Open source →
  15. 2.0.2 23 Jul 2025
    Release notes
    • Fix docs.rs crashing with a broken README link.
    Open source →
  16. 2.0.1 23 Jul 2025
    Release notes
    • Minor documentation improvements.
    Open source →
  17. 2.0.0 23 Jul 2025
    Release notes

    Rapidhash algorithm changes have pushed us towards a refactor of this crate. Compatibility with rapidhash V2.0, V2.1, V2.2, and V3 are now all supported under rapidhash::v3 and rapidhash::v2 modules. These expose rapidhash_v3 and similar methods to avoid version confusion. Each version produces different hash outputs.

    • Breaking: RapidHasher in-memory hasher overhaul:
      • RapidHasher deviates from the main rapidhash algorithm to improve performance hashing rust objects while maintaining similar hash quality. Performance should be significantly improved over the v1 crate.
      • RapidHasher may change the underlying hash between minor versions. The rust Hasher trait is not to be used for portable hashing, and we will follow this mantra to allow easily improving hashing performance. Portable hashing should be done though the rapidhash::v3::rapidhash_v3(bytes: &[u8]) and equivalent functions.
      • RapidHasher, RandomState, RapidHashMap, and RapidHashSet now move behind the following three modules:
        • rapidhash::fast when hashing speed is the priority. This sacrifices some hash quality for speed, uses FNV when hashing integer types, and skips the final avalanche mixing step.
        • rapidhash::quality when hash quality is the ultimate priority. This closely resembles the rapidhash algorithm and hash quality.
        • rapidhash::inner when you want to configure the settings for AVALANCHE, FNV, COMPACT, and PROTECTED modes as necessary.
    • Breaking: rapidhash portable hashing function moved and renamed, with different hash output:
      • Fixed the rapidhash V1 algorithm for 48 and 144 length inputs, where it would previously mismatch with the C implementation.
        • If you need the old broken rapidhash V1 hash output, rapidhash::v1::rapidhash_v1_inline can accept a compile time argument V1_BUG=true, which will reproduce the old hash output from the 1.x crate versions.
      • Moved and renamed rapidhash::rapidhash() to rapidhash::v1::rapidhash_v1() to allow us to include other rapidhash versions in the same naming convention.
    • Breaking: Random number generation has been moved behind the rng module, but otherwise works the same.
    • Breaking: RapidRandomState has been renamed to RandomState, and moved into fast, quality, and inner modules.
    • Breaking: Removed rapid_mix and rapid_mum from the public API for cleanliness. These are now internal functions.
    • Breaking: Removed the RapidInline* variants in favour of making the default Rapid types inline by default. If this is a problem for your use case, please raise a GitHub issue, thanks!
    • Breaking: Removed the deprecated RapidHashBuilder type, it has been replaced with RapidBuildHasher to match the rust naming convention.
    • New: Added support for rapidhash V2.0, V2.1, V2.2, and V3 algorithms.
    • New: rapidhash CLI now supports streaming properly with the V3 algorithm.
    • Fix: Full tests and verification against the C implementations for all versions.
    • Perf: Extensive benchmarking and optimisation, see more: https://github.com/hoxxep/rapidhash/issues/20
    Open source →
  18. 1.4.0 19 Feb 2025
    Release notes
    • Updated rand and rand-core to 0.9. #18
    • Fixed issue where using feature unsafe and without std would fail to compile. #15 and #17
    Open source →
  19. 1.3.0 30 Dec 2024
    Release notes
    • Added rapidhash_file for streaming file hashing. #10
    • Added file streaming and --help to the CLI. #10
    Open source →
  20. 1.2.0 04 Dec 2024
    Release notes
    • Added rapidhash CLI via cargo install rapidhash.
    • Docs typo fix.
    Open source →
  21. 1.1.0 02 Oct 2024
    Release notes
    • Deprecated RapidHashBuilder.
    • Added RapidBuildHasher to replace RapidHashBuilder.
    Open source →
  22. 1.0.0 02 Oct 2024
    Release notes

    Ownership kindly transferred by Justin Bradford to Liam Gray and this repository.

    • Breaking: Removed the hash function that only hashes on u128 types.
    • Added rapidhash and rapidhash_seeded functions to hash byte streams.
    • Added RapidHasher and RapidHasherInline for hashing via a std::hash::Hasher compatible interface.
    • Added RapidHashMap, RapidInlineHashMap, RapidHashSet, and RapidInlineHashSet helper types.
    • Added RapidHashBuilder and RapidInlineHashBuilder for std::hash::BuildHasher implementing types compatible with HashMap and HashSet.
    • Added RapidRandomState for random seed initialization.
    • Added RapidRng, rapidrng_fast, and rapidrng_time for random number generation inspired by the wyhash crate but based on rapid_mix.
    • Added std, rand, rng, and unsafe features.
    • Extensive benchmarking and optimisation.
    Open source →
  23. 0.1.0 17 Sep 2024
    Release notes

    Initial release by Justin Bradford supporting rapidhash on u128 inputs.

    • Added hash for rapidhashing u128 types.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive