solana-atomic-hash
solana-atomic-hash is a small Rust library providing a lock-free atomic wrapper around Solana 32-byte Hash values. It enables thread-safe, concurrent load and store of hashes using an internal array of AtomicU64 values.
Features
- Atomic load/store operations for Solana
Hashwithout locks - Represents 32-byte hashes as four atomic u64 elements
- Compatible with
solana-hashcrate'sHashtype - Lightweight and minimal dependencies
Usage
use Hash;
use AtomicHash;
use Ordering;
let hash = from;
let atomic_hash = new;
let loaded_hash = atomic_hash.load;
assert_eq!;
Author
Ivan Bets ivan.bets17@gmail.com