Skip to main content

load

Function load 

Source
pub fn load(root: &Path) -> Manifest
Expand description

Read and trust-gate root’s manifest.

ONE read. The bytes that get PARSED and the bytes that get HASHED are the same bytes: an earlier shape read(root)-ed and then let trust::state open the file a second time, so anything that changed it in between — a git checkout, a watcher, a make target already running — produced a trust decision about content that is not the content about to be executed.

Each call leaks the Scope slices it builds (see [leak]) — pennies for the hook path, which loads once per process, and the reason the fleet keeps reading read_lines instead: a scanner must not leak once per repository per refresh.