snix_build/oci/
mod.rs

1mod bundle;
2mod spec;
3pub(crate) mod subuid;
4
5pub(crate) use bundle::get_host_output_paths;
6pub(crate) use bundle::make_bundle;
7pub(crate) use spec::make_spec;
8
9use std::path::Path;
10
11/// For a given scratch path, return the scratch_name that's allocated.
12// We currently use use lower hex encoding of the b3 digest of the scratch
13// path, so we don't need to globally allocate and pass down some uuids.
14pub(crate) fn scratch_name(scratch_path: &Path) -> String {
15    data_encoding::BASE32
16        .encode(blake3::hash(scratch_path.as_os_str().as_encoded_bytes()).as_bytes())
17}