Skip to main content

export_distdir

Function export_distdir 

Source
pub fn export_distdir(
    crates: &[CrateEntry],
    distdir: &Path,
) -> Result<usize, CrateExportError>
Expand description

Materialise a Bazel distdir of the verified .crate tarballs (REQ-VENDOR-002, air-gap rules_rust). Bazel’s --distdir resolves an http_archive from a local file whose sha256 matches — with NO network and NO URL rewrite. Because varve’s signed .crate digest IS the crate_universe pin (== the crates.io checksum), a consumer that pre-generates its crate_universe output once and then builds with bazel build --distdir=<this dir> (network off) resolves every crate from varve’s verified bytes. varve emits the bytes; the consumer commits the generated crate_universe output (so no repin/index lookup at build time). Returns the number of tarballs written.