1 2 3 4 5 6 7 8 9 10 11
use std::io; use std::path::Path; /// Computes the BLAKE3 hash of a file. pub fn hash_file(path: &Path) -> io::Result<String> { let mut hasher = blake3::Hasher::new(); hasher.update_mmap_rayon(path)?; let hash = hasher.finalize(); Ok(hash.to_hex().to_string()) }