axhash-core 0.1.8

Platform-agnostic AxHash core for Rust with no_std compatibility.
Documentation

axhash-core

Core Engine (Rust)

Crates.io Documentation Downloads

Extensions & Distribution

Python FFI Downloads Support me

Mesin utama (core) AxHash: hash function non-cryptographic yang cepat, deterministik, dan fleksibel untuk Rust.


Fitur Utama

  • API Rust yang sederhana dan idiomatik
  • Kompatibel no_std (bisa dipakai di embedded, kernel, dsb)
  • Zero allocation di jalur utama
  • Seeded/deterministik, cocok untuk struktur data, cache, indexing
  • Backend otomatis memilih instruksi optimal (AES/NEON/dll)
  • Bisa dipakai langsung oleh crate binding lain seperti axhash-ffi, axhash-python, dsb

Instalasi

Tambahkan ke Cargo.toml:

[dependencies]
axhash-core = "0.1"

Contoh Penggunaan

Hash bytes langsung:

use axhash_core::axhash_seeded;

let hash = axhash_seeded(b"hello world", 0x1234_5678);
println!("Hash: {hash:016x}");

Streaming hash (implementasi Hasher):

use axhash_core::AxHasher;
use std::hash::Hasher;

let mut hasher = AxHasher::with_seed(0x1234);
hasher.write(b"data");
let hash = hasher.finish();

Lisensi

MIT. Bebas digunakan untuk open source maupun komersial.