| Crates.io | mycrush |
| lib.rs | mycrush |
| version | 1.0.1 |
| created_at | 2025-10-08 08:30:26.926304+00 |
| updated_at | 2025-10-09 12:26:59.322104+00 |
| description | Rust implementation of the CRUSH (Controlled Replication Under Scalable Hashing) algorithm |
| homepage | https://github.com/sevki/libcrush |
| repository | https://github.com/sevki/libcrush |
| max_upload_size | |
| id | 1873651 |
| size | 220,475 |
mycrush is a pure Rust implementation of the CRUSH algorithm, converted from C with c2rust and then refactored for safety and WASM compatibility.
wasm32-unknown-unknown target# Regular build
cargo build --package mycrush
# WASM build
cargo build --package mycrush --target wasm32-unknown-unknown --release
# Run tests
cargo test --package mycrush
The library has been successfully converted to a pure Rust implementation:
#[unsafe(no_mangle)] and extern "C" declarations removedFor detailed conversion notes, see PURE_RUST_CONVERSION.md.
This library still uses some internal libc functions (malloc/free/memcpy/memset) but is WASM-compatible through the libc crate's WASM support. Future work will replace these with pure Rust alternatives.