silk.build.fingerprint.
Deterministic content fingerprints for build inputs and completed output trees.
Import as Fingerprint with import silk.build.fingerprint as Fingerprint.
Public declarations: 6.
field#
pub fn field(hash: &mut Sha256, bytes: &[u8]) -> ()Adds a length-delimited byte string to a SHA-256 stream.
name#
pub effect fn name(digest: &[u8; 32]) -> String
! OutOfMemoryError
? &mut AllocatorConverts a digest into the lowercase hexadecimal directory name used by the build cache.
path#
pub effect fn path(hash: &mut Sha256, input: &Path, completion: bool) -> ()
! FileError | OutOfMemoryError
? &mut FileSystem | &mut AllocatorHashes file contents or a sorted tree, including names and empty directories.
Symbolic links within the declared root are followed; escaping links and cycles are refused.
completion excludes the root cache marker when verifying completed outputs.
recorded#
pub effect fn recorded(hash: &mut Sha256, input: &Path, completion: bool, records: &Path) -> ()
! FileError | OutOfMemoryError
? &mut FileSystem | &mut AllocatorAdds the digest path computes for input, reading file contents only when a file's status
changed since the digest was recorded under records.
The record is named by the status of every file in the tree: device, inode, size, modification time and status-change time. A changed, replaced or touched file therefore selects a different record and is read again. A host without file status reads the contents every time.
recordedPackage#
pub effect fn recordedPackage(hash: &mut Sha256, input: &Path, output: &Path, records: &Path) -> ()
! FileError | OutOfMemoryError
? &mut FileSystem | &mut AllocatorAdds the digest package computes for input, recorded as recorded describes.
package#
pub effect fn package(hash: &mut Sha256, input: &Path, output: &Path) -> ()
! FileError | OutOfMemoryError
? &mut FileSystem | &mut AllocatorHashes package files, excluding build outputs and version-control metadata at package roots.
output is the current workspace output directory, excluded at any depth.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.