10000 GitHub - owengombas/murmurs: πŸ«† A reliable and production-ready implementation of the Murmur3 hash function in Rust
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

owengombas/murmurs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ«† murmurs: A Reliable Murmur3 Hash in Rust

murmurs provides a reliable and production-ready implementation of the Murmur3 hash function, faithfully translated from the original C++ reference and usable in the same way.

The core logic resides in src/murmur3.rs, and its correctness is verified against the latest version of the official smhasher implementation through tests using C FFI bindings.

πŸ“¦ Installation

Add the following to your Cargo.toml:

[dependencies]
murmurs = "1.0" # or the latest published version

πŸš€ Usage

use murmurs::murmur3_x86_32;

fn main() {
    let hash = murmur3_x86_32(b"hello world", 0);
    println!("{}", hash);
}

Then run:

cargo run

βœ… Testing

The implementation is automatically tested against the reference C++ implementation from smhasher using FFI bindings.

To run the tests:

cargo test

πŸ”’ Status

  • βœ… Verified against the original MurmurHash3.cpp
  • βœ… Consistent 32-bit and 128-bit output
  • βœ… Portable and deterministic
  • βœ… Can be used the same way as the C++ reference

About

πŸ«† A reliable and production-ready implementation of the Murmur3 hash function in Rust

Topics

Resources

License

Stars

Watchers

Forks

0