murmur3

A Rust implementation of the fast, non-cryptographic MurmurHash3 algorithm.

Library
Cargo
v0.5.2
78stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
28/100Needs Attention
Development Activity0
Maintenance0
Community40
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
59/100Fair
Architecture60
Code Quality62
Innovation45
Learning Curve70

murmur3 is a pure-Rust implementation of the MurmurHash3 hashing algorithm, providing 32-bit and both 128-bit (x86 and x64) variants. It’s built for speed rather than cryptographic security, targeting use cases like hash tables, bloom filters, and data partitioning.

What You Get

  • murmur3_32 for streaming 32-bit hashes from any Read source
  • murmur3_x86_128 and murmur3_x64_128 for 128-bit hashes on the two reference architectures
  • Slice-based convenience wrappers (murmur3_32_of_slice, etc.) for in-memory buffers
  • quickcheck-based property tests validated against a C reference implementation (murmur3-sys)

Common Use Cases

  • Computing hash keys for hash tables or consistent-hashing/partitioning schemes
  • Building bloom filters or other probabilistic data structures that need a fast, well-distributed hash
  • Generating non-cryptographic checksums for deduplication or sharding of data
  • Cross-language interoperability where MurmurHash3 output must match implementations in other languages

Under The Hood

Architecture - The crate is split by hash variant into murmur3_32.rs, murmur3_x86_128.rs, and murmur3_x64_128.rs, each implementing the block-processing and finalization/mixing steps of the MurmurHash3 spec directly against a Read source, with lib.rs re-exporting slice-based convenience wrappers. Tech Stack - Zero runtime dependencies; the crate is pure, dependency-free Rust (edition 2018, MSRV 1.32+), with a companion murmur3-sys crate (FFI bindings to the original C implementation) used only as a dev-dependency for cross-validation in tests. Code Quality - Correctness is verified with quickcheck property tests (tests/test.rs) that compare Rust output against the C reference implementation via murmur3-sys bindings for all three hash variants, rather than relying on a small set of fixed-vector unit tests. API Design - The public API is minimal and function-based (no traits or builder types), mapping directly onto the three MurmurHash3 variants with both streaming and slice-based entry points, which keeps the surface easy to scan but means the crate hasn’t seen a commit since October 2024 and has an inactive maintenance status.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search