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#

silk
pub fn field(hash: &mut Sha256, bytes: &[u8]) -> ()

Adds a length-delimited byte string to a SHA-256 stream.

name#

silk
pub effect fn name(digest: &[u8; 32]) -> String
  ! OutOfMemoryError
  ? &mut Allocator

Converts a digest into the lowercase hexadecimal directory name used by the build cache.

path#

silk
pub effect fn path(hash: &mut Sha256, input: &Path, completion: bool) -> ()
  ! FileError | OutOfMemoryError
  ? &mut FileSystem | &mut Allocator

Hashes 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#

silk
pub effect fn recorded(hash: &mut Sha256, input: &Path, completion: bool, records: &Path) -> ()
  ! FileError | OutOfMemoryError
  ? &mut FileSystem | &mut Allocator

Adds 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#

silk
pub effect fn recordedPackage(hash: &mut Sha256, input: &Path, output: &Path, records: &Path) -> ()
  ! FileError | OutOfMemoryError
  ? &mut FileSystem | &mut Allocator

Adds the digest package computes for input, recorded as recorded describes.

package#

silk
pub effect fn package(hash: &mut Sha256, input: &Path, output: &Path) -> ()
  ! FileError | OutOfMemoryError
  ? &mut FileSystem | &mut Allocator

Hashes 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.

View the source of this page