You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(toolchain): publish per-chip Xtensa slices for linux-arm64, macos* and win32 #1956
Follow-up to #1944 (closed: ESP32-S3 first install now 3.37 min / 237.0 MB on the
official benchmark, target met on linux-amd64 only).
What is published today
site/mirror/shards/esp-toolchain.json carries @esp-toolchain slices for linux-amd64 only: esp32s3 106,462,349 B, esp32s2 106,655,161 B, esp32 141,361,956 B (uploaded by ci/publish_toolchain_slices.py, verified --verify). Every other host package in the vendor metadata (linux-arm64, linux-armel, linux-armhf, linux-i686, macos, macos-arm64, win32)
has no slice entry, so those clients keep downloading the whole ~176 MB unified
archive. That is the documented fallback, not a failure -- but it is where the
remaining install-time win is.
Why this is not a mechanical loop over hosts
publish_toolchain_slices.py is deliberately a separate invocation per host
("a slice holds that host's compilers"). The uploader's --verify re-downloads
and hashes, which proves bytes, not correctness. #1949/#1953 were only
accepted on linux-amd64 after a real end-to-end build proved the slice was not
a degraded toolchain (build succeeded in 65.1s, identical flash 355899 / ram 74919 to the whole-archive build). A slice is authoritative once listed
(crates/fbuild-packages-fetch/src/variants.rs: a listed slice fails the install
instead of quietly falling back), so a slice missing one chip-specific library
would convert a working whole-archive install into a hard failure for every user
on that host.
Work
For each host, download that host's archive from the vendor URL in tools/@esp-toolchain metadata, extract, and slice with ci/slice_toolchain.py; confirm the file set against the amd64 slice layout.
Prove it the way amd64 was proven: one real ESP32-S3 build from an empty
cache on a machine of that OS/arch (CI runner or the owner's host), asserting build succeeded and firmware flash/ram sizes identical to the
whole-archive build.
Only then list the entry in the shard. linux-arm64 first (CI runners,
arm Linux devs), then macos-arm64, then win32; linux-armel/armhf/i686
are almost certainly not worth the bytes.
Guardrails: additive only (a chip with no slice keeps the fallback), never list
an entry that has not been proven by a build on that host, and re-check ci/publish_toolchain_slices.py --check so the Index descriptor stays honest.
Attempted the linux-arm64 arm of this today. Two results:
The proof host exists.ubuntu-24.04-arm GitHub-hosted runners work for this
repository, and PyPI ships an fbuildmanylinux_2_17_aarch64 wheel, so uv tool install fbuild==<v> gives a complete arm64 fbuild with no soldr and no
host build. Two cold-cache ESP32-S3 Blink builds there: build succeeded in 100.5 s / 98.5 s, flash 356075 / ram 74919 — the same numbers as the
linux-amd64 whole-archive build.
But step 2 is blocked, and the blocker is not arm64. With FBUILD_MIRROR_MANIFEST_URL pointed at a manifest that lists the linux-arm64
slice, fbuild still downloaded the vendor whole archive and created no …+esp32s3 install dir. The same happens on linux-amd64, where the slice IS
published and proven — so the override itself does not move slice resolution.
Filed as #1961 with both logs. Until that is fixed there is no way to prove a new
host's slice before listing it, which is exactly the ordering this issue forbids
breaking ("never list an entry that has not been proven by a build on that host").
Published but deliberately not listed: the linux-arm64 bundle
(xtensa-esp-elf-14.2.0_20260121-aarch64-linux-gnu.tar.xz, 171,504,672 B, sha256
matches the metadata pin) and its esp32s3 slice (104,408,554 B) are in the
bucket, unreferenced by any shard. Nothing resolves them until the entry lands.
Also fixed while doing this: the uploader keyed the mirrored bundle off the
operator's local file name, so the bundle first landed at …/linux-arm64/whole/arm64.tar.xz while the shard listed the vendor filename
(orphan deleted) — PR #1962, with the arm64 proof harness that will turn green
once #1961 is fixed.
linux-arm64: done — listed and proven (PR #1965, merged ededbdf1).
site/mirror/shards/esp-toolchain.json now carries toolchain-xtensa-esp-elf/14.2.0_20260121/linux-arm64 with the esp32s3
slice (104,408,554 B vs the 171,504,672 B whole archive). Chips stay additive: esp32/esp32s2 and every non-Xtensa target keep the whole-archive fallback.
Proof, on a real ubuntu-24.04-arm runner
(run 42526030221,
all steps green), two cold builds:
slice: flash 356075 / ram 74919 (build succeeded in 17.7s)
whole: flash 356075 / ram 74919 (build succeeded in 59.1s)
slice build used the per-chip install and downloaded no whole archive
Sizes alone were not accepted as proof — earlier runs produced identical sizes
on builds that never touched the slice. The assertion also requires a …+esp32s3 install directory and no whole .tar.xz in the slice build's
cache.
The published arm64 objects were re-verified before listing: re-slicing the
metadata-pinned vendor bundle reproduced the bucket sha 15e485dddf36539aca26627491961426a589e33c60f8f99fceba2e8e3cd33cda exactly,
and the whole bundle's sha 80ae10ce… matches its pin.
Remaining from this issue: macos-arm64, then win32. Both need their own host
proofs; linux-armel/armhf/i686 are probably not worth the bytes. The harness
(.github/workflows/esp32s3-arm64-slice-proof.yml) is the template — a macOS
runner would need runs-on: macos-14 plus its own manifest override, since the
slice is host-specific.
macos-arm64: done — listed and proven (PR #1966, merged 246b042e).
site/mirror/shards/esp-toolchain.json now carries toolchain-xtensa-esp-elf/14.2.0_20260121/macos-arm64 with the esp32s3
slice: 96,028,501 B vs the 170,666,656 B vendor package (-44%). The whole
bundle is mirrored bucket-first as the shard contract requires. Chips stay
additive — esp32/esp32s2 and every other host keep the whole-archive
fallback.
Both legs also require a chip-scoped …+esp32s3 install directory and no
whole .tar.xz in the slice build's cache — sizes alone are not accepted as
proof.
Two things worth recording:
A new workflow_dispatch harness cannot be proven from its own branch.
GitHub resolves the workflow id against the default branch, so gh workflow run <new-file> --ref <branch> 404s with "not found on the
default branch". The macOS proof therefore rides on the already-dispatchable esp32s3-arm64-slice-proof.yml, which is now a two-leg matrix
(ubuntu-24.04-arm → linux-arm64, macos-15 → macos-arm64) with the
host/arch assertion and cache key parametrised. The Linux leg is re-run and
still byte-identical.
Slicing for a foreign host is fine on any host. Selection is by path
component (lib/esp32s3, …), so the macOS package sliced identically on
Linux; only the proof needs the real macOS machine. The vendor bundle was
pinned first (sha256 a450db49… from tools.json) and both uploaded objects
were HEAD-checked before the shard named them.
Remaining: win32 (413 MB zip; needs a Windows host proof). linux-armel / linux-armhf / linux-i686 still look not worth the bytes.
win64: done — listed and proven (PR #1967, merged 57ef016c).
First, a correction worth having in the record: this issue asks for win32, but fbuildnever resolves win32. detect_platform()
(crates/fbuild-toolchain/src/toolchain/esp32_metadata.rs) returns "win64" on
every Windows host — there is no 32-bit Windows target. Worse, the publisher
rejected the key that matters:
HOST_KEYS carried the vendor's win32 and not win64, so the one Windows key
clients actually resolve could not be published at all. Fixed in code: win64
added, plus HostKeyParityTests which reads detect_platform() out of the Rust
source and fails when a key it can return is missing from HOST_KEYS
(assertEqual(keys - HOST_KEYS, set())) — the class of bug, not the instance. No win32 slice was produced: it would be downloaded by nobody.
site/mirror/shards/esp-toolchain.json now carries toolchain-xtensa-esp-elf/14.2.0_20260121/win64 with the esp32s3 slice: 108,967,431 B vs 413,859,845 B whole (−73.7%; the Windows bundle is a zip of a
1.4 GB tree). The whole bundle is mirrored bucket-first and byte-identical to the tools.json pin (82cbe035…), both objects range-verified after upload, and --check re-hashes the shard (Index descriptor 5ac459de…, 5,073 B). Chips stay
additive: esp32/esp32s2 keep the whole-archive fallback.
Both halves of the contract asserted, not just sizes: a …+esp32s3 chip-scoped
install directory and no whole xtensa-esp-elf archive in the slice build's
cache.
Two things worth recording:
The proof harness had to become host-agnostic rather than Windows-only: job-level shell: bash (Git Bash on the runner), a matrix-driven daemon name
(fbuild-daemon.exe), and a "no whole archive" assertion keyed on the vendor
asset name — the Windows bundle is a .zip, while a registry platform zip in
the same cache is legitimate. The file is still named esp32s3-arm64-slice-proof.yml because workflow_dispatch resolves the
workflow id on the default branch, and renaming would 404 every dispatch.
Per-host status now: linux-amd64 (esp32/esp32s2/esp32s3), linux-arm64, macos-arm64, win64 (esp32s3). Remaining: whole-archive fallback by design
for linux-armel/armhf/i686 (not worth the bytes, per this issue) and for macos (Intel) — that one could be added the same way if anyone is still on
Intel macOS. Leaving this open for that call.
site/mirror/shards/esp-toolchain.json now carries toolchain-xtensa-esp-elf/14.2.0_20260121/macos with the esp32s3 slice:
99,848,668 B vs the 177,355,744 B vendor package (-43.7%). Intel macOS resolves macos (not macos-arm64) from detect_platform(), so that is the key those
clients download. Whole bundle mirrored bucket-first (sha 02e5e342… == the
metadata pin), both objects range-verified, --check matches the Index descriptor.
Proof, run 42557951888, macos-15-intel (x86_64) leg green alongside linux-arm64 / macos-arm64 / win64:
The leg also requires a +esp32s3 chip-scoped install and no whole xtensa-esp-elf archive in the slice cache — sizes alone were never accepted as
proof. (Wall times here are runner/network variance, not a claim of speedup; the
install-time win on this host is still the smaller download.)
Every host this issue scoped is now published and proven: linux-amd64, linux-arm64, macos-arm64, macos, win64 (Windows resolves win64, never
the vendor's win32 — see the previous comment). Closing as complete. linux-armel / linux-armhf / linux-i686 remain unsliced on purpose, as this
issue itself judged them "almost certainly not worth the bytes"; if one ever
matters, it is one ci/publish_toolchain_slices.py --host <key> invocation plus
a leg in esp32s3-arm64-slice-proof.yml.
Activity
feat(toolchain): list the proven linux-arm64 esp32s3 slice; name the …
fix(ci): name the mirrored toolchain bundle after the vendor asset
zackees commentedon Nov 8, 2026
Attempted the
linux-arm64arm of this today. Two results:The proof host exists.
ubuntu-24.04-armGitHub-hosted runners work for thisrepository, and PyPI ships an
fbuildmanylinux_2_17_aarch64wheel, souv tool install fbuild==<v>gives a complete arm64 fbuild with no soldr and nohost build. Two cold-cache ESP32-S3 Blink builds there:
build succeeded in 100.5 s / 98.5 s,flash 356075 / ram 74919— the same numbers as thelinux-amd64 whole-archive build.
But step 2 is blocked, and the blocker is not arm64. With
FBUILD_MIRROR_MANIFEST_URLpointed at a manifest that lists the linux-arm64slice, fbuild still downloaded the vendor whole archive and created no
…+esp32s3install dir. The same happens on linux-amd64, where the slice ISpublished and proven — so the override itself does not move slice resolution.
Filed as #1961 with both logs. Until that is fixed there is no way to prove a new
host's slice before listing it, which is exactly the ordering this issue forbids
breaking ("never list an entry that has not been proven by a build on that host").
Published but deliberately not listed: the linux-arm64 bundle
(
xtensa-esp-elf-14.2.0_20260121-aarch64-linux-gnu.tar.xz, 171,504,672 B, sha256matches the metadata pin) and its
esp32s3slice (104,408,554 B) are in thebucket, unreferenced by any shard. Nothing resolves them until the entry lands.
Also fixed while doing this: the uploader keyed the mirrored bundle off the
operator's local file name, so the bundle first landed at
…/linux-arm64/whole/arm64.tar.xzwhile the shard listed the vendor filename(orphan deleted) — PR #1962, with the arm64 proof harness that will turn green
once #1961 is fixed.
zackees commentedon Nov 8, 2026
linux-arm64: done — listed and proven (PR #1965, merged
ededbdf1).site/mirror/shards/esp-toolchain.jsonnow carriestoolchain-xtensa-esp-elf/14.2.0_20260121/linux-arm64with theesp32s3slice (104,408,554 B vs the 171,504,672 B whole archive). Chips stay additive:
esp32/esp32s2and every non-Xtensa target keep the whole-archive fallback.Proof, on a real
ubuntu-24.04-armrunner(run 42526030221,
all steps green), two cold builds:
Sizes alone were not accepted as proof — earlier runs produced identical sizes
on builds that never touched the slice. The assertion also requires a
…+esp32s3install directory and no whole.tar.xzin the slice build'scache.
Two things worth recording:
uv tool install fbuild==2.5.51: that release predates fix(toolchain): scope registry-resolved toolchain to its MCU chip (slice was never selected) #1963, so its wheelignores
FBUILD_MIRROR_MANIFEST_URL(bug(ci): FBUILD_MIRROR_MANIFEST_URL does not move slice resolution — a new host slice cannot be proven before it is listed #1961) and would have "passed" withoutever resolving the slice.
metadata-pinned vendor bundle reproduced the bucket sha
15e485dddf36539aca26627491961426a589e33c60f8f99fceba2e8e3cd33cdaexactly,and the whole bundle's sha
80ae10ce…matches its pin.Remaining from this issue:
macos-arm64, thenwin32. Both need their own hostproofs;
linux-armel/armhf/i686are probably not worth the bytes. The harness(
.github/workflows/esp32s3-arm64-slice-proof.yml) is the template — a macOSrunner would need
runs-on: macos-14plus its own manifest override, since theslice is host-specific.
zackees commentedon Nov 9, 2026
macos-arm64: done — listed and proven (PR #1966, merged
246b042e).site/mirror/shards/esp-toolchain.jsonnow carriestoolchain-xtensa-esp-elf/14.2.0_20260121/macos-arm64with theesp32s3slice: 96,028,501 B vs the 170,666,656 B vendor package (-44%). The whole
bundle is mirrored bucket-first as the shard contract requires. Chips stay
additive —
esp32/esp32s2and every other host keep the whole-archivefallback.
Proof, run 42536361264,
both legs green:
Both legs also require a chip-scoped
…+esp32s3install directory and nowhole
.tar.xzin the slice build's cache — sizes alone are not accepted asproof.
Two things worth recording:
workflow_dispatchharness cannot be proven from its own branch.GitHub resolves the workflow id against the default branch, so
gh workflow run <new-file> --ref <branch>404s with "not found on thedefault branch". The macOS proof therefore rides on the already-dispatchable
esp32s3-arm64-slice-proof.yml, which is now a two-leg matrix(
ubuntu-24.04-arm→linux-arm64,macos-15→macos-arm64) with thehost/arch assertion and cache key parametrised. The Linux leg is re-run and
still byte-identical.
component (
lib/esp32s3, …), so the macOS package sliced identically onLinux; only the proof needs the real macOS machine. The vendor bundle was
pinned first (
sha256 a450db49…fromtools.json) and both uploaded objectswere HEAD-checked before the shard named them.
Remaining:
win32(413 MB zip; needs a Windows host proof).linux-armel/linux-armhf/linux-i686still look not worth the bytes.zackees commentedon Nov 9, 2026
win64: done — listed and proven (PR #1967, merged
57ef016c).First, a correction worth having in the record: this issue asks for
win32, butfbuildnever resolveswin32.detect_platform()(
crates/fbuild-toolchain/src/toolchain/esp32_metadata.rs) returns"win64"onevery Windows host — there is no 32-bit Windows target. Worse, the publisher
rejected the key that matters:
HOST_KEYScarried the vendor'swin32and notwin64, so the one Windows keyclients actually resolve could not be published at all. Fixed in code:
win64added, plus
HostKeyParityTestswhich readsdetect_platform()out of the Rustsource and fails when a key it can return is missing from
HOST_KEYS(
assertEqual(keys - HOST_KEYS, set())) — the class of bug, not the instance. Nowin32slice was produced: it would be downloaded by nobody.site/mirror/shards/esp-toolchain.jsonnow carriestoolchain-xtensa-esp-elf/14.2.0_20260121/win64with theesp32s3slice:108,967,431 B vs 413,859,845 B whole (−73.7%; the Windows bundle is a zip of a
1.4 GB tree). The whole bundle is mirrored bucket-first and byte-identical to the
tools.jsonpin (82cbe035…), both objects range-verified after upload, and--checkre-hashes the shard (Index descriptor5ac459de…, 5,073 B). Chips stayadditive:
esp32/esp32s2keep the whole-archive fallback.Proof, run 42547282445,
all three legs green:
Both halves of the contract asserted, not just sizes: a
…+esp32s3chip-scopedinstall directory and no whole
xtensa-esp-elfarchive in the slice build'scache.
Two things worth recording:
shell: bash(Git Bash on the runner), a matrix-driven daemon name(
fbuild-daemon.exe), and a "no whole archive" assertion keyed on the vendorasset name — the Windows bundle is a
.zip, while a registry platform zip inthe same cache is legitimate. The file is still named
esp32s3-arm64-slice-proof.ymlbecauseworkflow_dispatchresolves theworkflow id on the default branch, and renaming would 404 every dispatch.
linux-amd64(esp32/esp32s2/esp32s3),linux-arm64,macos-arm64,win64(esp32s3). Remaining: whole-archive fallback by designfor
linux-armel/armhf/i686(not worth the bytes, per this issue) and formacos(Intel) — that one could be added the same way if anyone is still onIntel macOS. Leaving this open for that call.
zackees commentedon Nov 9, 2026
Intel
macos: done — listed and proven (PR #1968, mergedf38dd493).site/mirror/shards/esp-toolchain.jsonnow carriestoolchain-xtensa-esp-elf/14.2.0_20260121/macoswith theesp32s3slice:99,848,668 B vs the 177,355,744 B vendor package (-43.7%). Intel macOS resolves
macos(notmacos-arm64) fromdetect_platform(), so that is the key thoseclients download. Whole bundle mirrored bucket-first (sha
02e5e342…== themetadata pin), both objects range-verified,
--checkmatches the Index descriptor.Proof, run 42557951888,
macos-15-intel(x86_64) leg green alongside linux-arm64 / macos-arm64 / win64:The leg also requires a
+esp32s3chip-scoped install and no wholextensa-esp-elfarchive in the slice cache — sizes alone were never accepted asproof. (Wall times here are runner/network variance, not a claim of speedup; the
install-time win on this host is still the smaller download.)
Every host this issue scoped is now published and proven:
linux-amd64,linux-arm64,macos-arm64,macos,win64(Windows resolveswin64, neverthe vendor's
win32— see the previous comment). Closing as complete.linux-armel/linux-armhf/linux-i686remain unsliced on purpose, as thisissue itself judged them "almost certainly not worth the bytes"; if one ever
matters, it is one
ci/publish_toolchain_slices.py --host <key>invocation plusa leg in
esp32s3-arm64-slice-proof.yml.