File Hash
v0.1.0Added Sep 26, 2026Sample dataStreaming BLAKE3 and SHA-256 hashing for file integrity checks and exact-duplicate detection in datasets.
cargo install kura-rs
kura add file-hashCopies the source file into your project. You own the code from then on.
If another tool already installs a kura command, run cargo install kura-rs --bin kura-rs and use kura-rs add instead.
use crate::parts::file_hash::{hash_file, Algorithm};
let digest = hash_file(Algorithm::Blake3, "model.safetensors")?;
println!("{digest}");Verification
Sample dataChecked against hashlib 3.12 (Python) using golden files: the same inputs go to both implementations and the outputs are compared.
These numbers are placeholders. They have not been measured yet and must not be read as real results. This part is marked "sample": true in its registry file.
Benchmarks
Sample datakura-rs (Rust) against hashlib across input sizes. Faster at every measured input size, up to 5.7× faster.
These numbers are placeholders. They have not been measured yet and must not be read as real results. This part is marked "sample": true in its registry file.
Show data table
| Input size | kura-rs (Rust) | hashlib | Speedup |
|---|---|---|---|
| 1,024 | 0 ms | 0.01 ms | 1.5× |
| 65,536 | 0.03 ms | 0.11 ms | 3.7× |
| 1,048,576 | 0.31 ms | 1.6 ms | 5.2× |
| 16,777,216 | 4.6 ms | 26 ms | 5.7× |
| 268,435,456 | 72 ms | 410 ms | 5.7× |