Skip to main content

Module util

Module util 

Source
Expand description

Path, URI, and hashing utilities shared by the sources, builders, and rules.

Functions§

hash_bytes
Hash content with BLAKE3, returning b3:<hex>.
is_uri
Check whether a target string is a URI.
normalize_relative_path
Normalize a relative path by resolving . and .. components using path APIs. Does not touch the filesystem. Always returns forward-slash separated paths. Preserves leading .. that escape above the root, and preserves an absolute root/prefix (/foo, C:\foo) verbatim — both indicate graph escape and must not be silently rewritten into in-graph relative paths.
resolve_link
Resolve a link target relative to a source file, producing a path relative to the graph root.