pub struct FormulaData {
pub versions: FormulaVersions,
pub urls: FormulaUrls,
pub bottle: FormulaBottle,
pub dependencies: Vec<String>,
pub build_dependencies: Vec<String>,
pub uses_from_macos: Vec<UsesFromMacos>,
pub ruby_source_path: Option<String>,
}Expand description
A parsed Homebrew formula (the subset served verbatim by /formula/:name).
The version is never hardcoded — a formula bump is picked up automatically.
Fields§
§versions: FormulaVersionsReleased versions (we use stable).
urls: FormulaUrlsSource/bottle URLs (we use stable.{url,checksum}).
bottle: FormulaBottlePrebuilt bottle coordinates (per-platform {url,sha256}).
dependencies: Vec<String>Runtime dependencies (other formulae the tool links / runs against).
build_dependencies: Vec<String>Build-only dependencies (autoconf, pkgconf, cmake, …).
uses_from_macos: Vec<UsesFromMacos>Dependencies satisfied by macOS itself (curl, expat, zlib, …). Each
entry is either a bare name or a {name: [conditions]} object.
ruby_source_path: Option<String>Path of the formula’s Ruby definition within homebrew-core
(e.g. Formula/g/git.rb).
Implementations§
Source§impl FormulaData
impl FormulaData
Sourcepub fn stable_version(&self) -> Option<&str>
pub fn stable_version(&self) -> Option<&str>
The stable version, if present and non-empty.
Sourcepub fn stable_url(&self) -> Option<&str>
pub fn stable_url(&self) -> Option<&str>
The stable source tarball URL, if present and non-empty.
Sourcepub fn stable_checksum(&self) -> Option<String>
pub fn stable_checksum(&self) -> Option<String>
The stable source tarball sha256 (bare hex, sha256: prefix stripped),
if present and non-empty.
Sourcepub fn bottle_file(&self, tag: &str) -> Option<&FormulaBottleFile>
pub fn bottle_file(&self, tag: &str) -> Option<&FormulaBottleFile>
The prebuilt bottle file for a platform tag (e.g. arm64_sonoma).
Sourcepub fn macos_provided(&self) -> Vec<String>
pub fn macos_provided(&self) -> Vec<String>
The set of dependency names macOS itself provides (so a source build need not resolve them as kegs).
Trait Implementations§
Source§impl Clone for FormulaData
impl Clone for FormulaData
Source§fn clone(&self) -> FormulaData
fn clone(&self) -> FormulaData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more