Skip to main content

ensure_from_source

Function ensure_from_source 

Source
pub async fn ensure_from_source(
    formula: &str,
    cache_dir: &Path,
    lockfile: Option<&ToolchainLockfile>,
) -> Result<PathBuf>
Expand description

Build formula from source into a self-contained keg under cache_dir, writing a KegManifest and returning the keg path.

Idempotent: a <keg>/.ready marker (written LAST, after the manifest) short-circuits a populated keg. A cold build removes any partial keg, builds into a scratch dir, installs into the keg prefix, writes the manifest, then stamps .ready.

ยงErrors

Propagates formula-resolution, download, extraction, dependency, and build failures.