pub struct BuildRecord {
pub builder: String,
pub source_repo: String,
pub source_commit: String,
pub recipe: String,
pub toolchain: String,
pub network: bool,
pub materials: Vec<Subject>,
pub subjects: Vec<Subject>,
pub started_at_unix_ms: i64,
pub finished_at_unix_ms: i64,
}Expand description
What a builder claims about one build.
Fields§
§builder: StringThe ACL principal that ran the build. A principal, not a hostname: the question a verifier asks is whose builder was this, and a hostname answers a different one.
source_repo: String<namespace>/<repo> the source came from.
source_commit: StringThe commit that was built, hex. This is the join to links 2–4.
recipe: StringWhat the build was asked to make — a recipe, an atom, a variant name.
toolchain: StringThe toolchain, as the builder resolved it (rustc 1.85.0 (…)).
Free text on purpose: pinning a structure here would make a build with an unusual toolchain unrecordable, and an unrecordable build is one that happens anyway and is not attested.
network: boolWhether the build had network access.
A claim by the builder about itself, and the module docs say what that is worth. It is recorded rather than omitted because a record that cannot express “this was not hermetic” makes every build look hermetic.
materials: Vec<Subject>What went in: pinned sources, vendored dependencies, base images.
subjects: Vec<Subject>What came out.
started_at_unix_ms: i64When it started, in Unix milliseconds.
finished_at_unix_ms: i64When it finished, in Unix milliseconds.
Implementations§
Source§impl BuildRecord
impl BuildRecord
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
The exact bytes that are signed.
A canonical, line-oriented rendering rather than the JSON, for the same reason a tree head signs one: JSON has no canonical form, so signing a serialisation makes the signature depend on the serialiser’s field order. Every field appears once, in a fixed order, and the lists are rendered in the order the builder recorded them.
Sourcepub fn digest(&self) -> String
pub fn digest(&self) -> String
SHA-256 over Self::signing_bytes, hex — the record’s own identity.