Expand description
Proof that this build’s Askama code was compiled from the templates of the checkout it runs in.
The templates are compiled into the crate, so a compiler cache (kache) or a CARGO_TARGET_DIR
shared across worktrees can serve a build of another checkout whose templates differ: nv codegen abi --check then “verifies” the host files against the wrong templates. build.rs
embeds the bytes of every template into the same compilation as the Askama code, so a replayed
build carries the templates it was really compiled from, and verify_embedded_templates
compares them with the checkout’s templates/ directory.
Structs§
- Template
Drift - The difference between the templates a build embeds and a
templates/directory on disk.
Functions§
- verify_
embedded_ templates - Fails with
CodegenError::StaleTemplateswhen the templates this build was compiled from differ fromtemplates_dir(the checkout’spackages/core/codegen/templates).