MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / content_hash

Function content_hash

src/shader_build.rs:384–394  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

382}
383
384fn content_hash(path: &Path) -> String {
385 let bytes = std::fs::read(path)
386 .unwrap_or_else(|e| panic!("Failed to read '{}': {}", path.display(), e));
387 // Simple hash: use a basic FNV-1a 64-bit hash (no external deps)
388 let mut hash: u64 = 0xcbf29ce484222325;
389 for byte in &bytes {
390 hash ^= *byte as u64;
391 hash = hash.wrapping_mul(0x100000001b3);
392 }
393 format!("{:016x}", hash)
394}
395
396fn handler_dep_globs_cached(hashes: &HashMap<String, String>, dep_key: &str) -> Vec<String> {
397 match hashes.get(dep_key) {

Callers 3

buildMethod · 0.85
check_dep_hashes_changedFunction · 0.85

Calls

no outgoing calls

Tested by 1