Expand description
Pluggable PHP-distribution backends.
A Backend resolves a user-facing request (bougie php install 8.4)
into a PhpRecipe — a self-contained description of one blob to
download and how to extract it. Today there’s exactly one
implementation, [bougie_index::BougieIndexBackend], which talks to
index.bougie.tools (or a configured mirror) using the signed
root → section → manifest protocol. Phase 3 of WINDOWS_PLAN.md adds
WindowsPhpNetBackend, which fetches releases.json from
windows.php.net and synthesizes a PhpRecipe for that distribution.
The trait deliberately keeps the surface narrow: resolution is
pure-ish (network I/O, no filesystem mutation). The recipe carries
everything install_php needs to drive bougie_fetch::fetch_blob,
so the install code is identical across backends — the only
per-backend choice is which Backend impl to construct.
The trait grows symmetrically for extensions: resolve_extension
returns an ExtRecipe that carries everything install_extension
needs to drive the same fetch + place + conf.d dance regardless of
backend. Closure peers (bougie-index only) ride on the recipe as a
ClosureRef list — windows.php.net always returns an empty one,
and the install code’s closure-handling step is a no-op for it.
Re-exports§
pub use bougie_index_backend::BougieIndexBackend;pub use nodejs_org::NodeRecipe;pub use nodejs_org::NodeRequest;pub use nodejs_org::NodeVersion;pub use nodejs_org::NodejsOrgBackend;pub use windows_php_net::WindowsPhpNetBackend;
Modules§
- bougie_
index_ backend BougieIndexBackend— the legacy code path, now behind thesuper::Backendtrait.- nodejs_
org NodejsOrgBackend— Node.js interpreter source for all hosts.- windows_
php_ net WindowsPhpNetBackend— interpreter source for Windows hosts.
Structs§
- BlobRef
- One blob to fetch and extract.
- Closure
Ref - One bundled-library entry an extension
.sodepends on at runtime. - ExtRecipe
- A resolved PHP extension, ready to fetch + place into the content-addressed store.
- PhpRecipe
- A resolved PHP interpreter, ready to install.
Traits§
- Backend
- A source of PHP interpreter artifacts. One concrete impl per distribution channel — bougie’s own signed index, windows.php.net.
Functions§
- select
- Pick the right backend for the host target.