Skip to main content

prepare

Function prepare 

Source
pub fn prepare(
    spec: &PrepareSpec<'_>,
    notes: &mut Vec<String>,
) -> Result<Prepared, Fail>
Expand description

Prepare this box. notes collects everything worth telling the operator that is not a failure (a reused mount, a tmpfs stage, a nearly-full volume); the caller prints them.

Cheap before expensive: the gate, the mount and the write proofs all finish in about the time it takes to say so, while a source fetch and a cold build take minutes. The source comes before libtorch for the same reason at a smaller scale — a tree is megabytes and a libtorch variant is gigabytes, so a broken spec should fail before the download rather than after it.