File Hash

v0.1.0Added Sep 26, 2026Sample data

Streaming BLAKE3 and SHA-256 hashing for file integrity checks and exact-duplicate detection in datasets.

Sample data. These figures are placeholders, not measurements.

cargo install kura-rs
kura add file-hash

Copies 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 data

Checked against hashlib 3.12 (Python) using golden files: the same inputs go to both implementations and the outputs are compared.

Reference
hashlib
Python 3.12
Test cases
800
Golden files
Passed
800 / 800
All cases match
Last run
Sep 26, 2026
UTC

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 data

kura-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.

kura-rs (Rust)hashlib
Wall time per run (lower is better).
Show data table
Input sizekura-rs (Rust)hashlibSpeedup
1,0240 ms0.01 ms1.5×
65,5360.03 ms0.11 ms3.7×
1,048,5760.31 ms1.6 ms5.2×
16,777,2164.6 ms26 ms5.7×
268,435,45672 ms410 ms5.7×

Files

  • parts/file_hash/mod.rs

Crate dependencies