Skip to main content

Module formula

Module formula 

Source
Expand description

The single Homebrew formula parser shared by every macOS provisioning path.

The formula shape now lives in zlayer-types (zlayer_types::package_index::FormulaData) so it is shared verbatim with zlayer-builder (a later commit). This module re-exports it as Formula and resolves a formula THROUGH the crate::package_index::PackageIndexClient: the ZLayer package index (packages.zlayer.dev) first, with the direct formulae.brew.sh upstream as a graceful fallback. The resolved formula carries versions.stable, urls.stable.{url,checksum} (the source-tarball sha256), the per-platform bottle.stable.files, the dependency graph, and ruby_source_path — everything the source-build + dependency-resolution pipeline needs.

Structs§

Formula
A parsed Homebrew formula — re-exported from zlayer-types so the toolchain and the builder consume the exact same wire shape. A parsed Homebrew formula (the subset served verbatim by /formula/:name).

Enums§

UsesFromMacos
A parsed Homebrew formula — re-exported from zlayer-types so the toolchain and the builder consume the exact same wire shape. An entry in uses_from_macos: either a bare formula name, or a {name: [conditions]} object (e.g. {"llvm": ["build"]}).

Functions§

fetch_formula
Fetch and parse a formula through the package index.