Stage0 Distribution¶
This document defines how static stage0 binaries are produced and consumed across CI, release assets, and downstream packaging.
Artifact Contract¶
Release assets include first-class stage0 static binaries:
fastboop-stage0-x86_64-unknown-linux-muslfastboop-stage0-aarch64-unknown-linux-musl
For tag vX.Y.Z (or vX.Y.Z-rc.N), assets are published alongside other release artifacts:
https://github.com/samcday/fastboop/releases/download/vX.Y.Z/fastboop-stage0-x86_64-unknown-linux-muslhttps://github.com/samcday/fastboop/releases/download/vX.Y.Z/fastboop-stage0-aarch64-unknown-linux-musl
Checksums are recorded in release SHA256SUMS.
Embed Modes¶
crates/fastboop-stage0-generator/build.rs supports three embed modes:
FASTBOOP_STAGE0_EMBED_PATHset: copy the provided prebuilt stage0 binary and embed it.FASTBOOP_STAGE0_EMBED_PATHunset: run the local nested stage0 sub-build only when source-repo layout includesstage0/Cargo.toml(contributor convenience).FASTBOOP_STAGE0_EMBED_PATHunset and no localstage0/Cargo.toml: foraarch64-unknown-linux-musl, downloadfastboop-stage0-aarch64-unknown-linux-muslfrom release tagv${CARGO_PKG_VERSION}and verify its checksum from sidecarstage0-aarch64.sha256sum.
If none of these modes apply, build.rs fails fast and requires an explicit prebuilt stage0 path.
Optional knobs for nested sub-builds:
FASTBOOP_STAGE0_TARGET(defaultaarch64-unknown-linux-musl)FASTBOOP_STAGE0_CARGO(default inheritedcargo)
This preserves local cargo build -p fastboop-cli round-trips while allowing distro/release flows to consume prebuilt stage0 assets.
CI and Release Flow¶
.github/workflows/ci.ymlbuilds stage0 static artifacts in a dedicatedstage0-staticmatrix..github/workflows/release.ymlrunsstage0-preflightbefore downstream packaging jobs.stage0-preflightverifies both required stage0 artifacts exist and are static/static-pie linked..github/workflows/release.ymltag mode bakescrates/fastboop-stage0-generator/stage0-aarch64.sha256sumfrom CI stage0 artifacts immediately beforejust publish.- Release asset fan-in includes stage0 binaries and
SHA256SUMS.
Downstream Packaging¶
- Debian workflow: downloads
fastboop-stage0-aarch64artifact and exportsFASTBOOP_STAGE0_EMBED_PATHbefore package build. - Alpine workflow: same release-mode artifact flow via
FASTBOOP_STAGE0_EMBED_PATH. - RPM spec: exports
FASTBOOP_STAGE0_EMBED_PATHwhen either: --define 'fastboop_stage0_embed_path /path/to/fastboop-stage0-aarch64-unknown-linux-musl'is passed, or%{_sourcedir}/fastboop-stage0-aarch64-unknown-linux-muslexists.
If no prebuilt stage0 path is provided, packaging falls back to nested sub-build behavior only when the local source repo includes the stage0 workspace sources.
Armv7 Status¶
Issue #13 allows armv7-unknown-linux-musleabihf or documented equivalent. Current release gating intentionally uses x86_64+aarch64 only.
Reason: upstream io-uring target checks currently block reliable armv7 stage0 static artifact production in CI without additional architecture-specific work. Armv7 remains deferred follow-up scope.