pub fn package_digest(dir: &Path) -> Result<[u8; 32], PackageError>Expand description
Compute a deterministic SHA-256 digest over all package source files.
Walks the package directory, collects all files (excluding target/,
.git/, and *.sig files), sorts by relative path, and feeds each
file’s relative path and contents into a SHA-256 hasher.
The resulting 32-byte digest covers the entire package contents. Sign this digest to protect against tampering.