INNER CODE UNIT · Rust
lockfile_blake3
logannye/rosalind · crates/build-info/src/lib.rs:61
fn lockfile_blake3() -> Option<String> {
let directory = std::env::var("CARGO_MANIFEST_DIR").ok()?;
let bytes = std::fs::read(Path::new(&directory).join("Cargo.lock")).ok()?;
Some(blake3::hash(&bytes).to_hex().to_string())
}