feat(build): build no_std components for wasm32-unknown-unknown, not wasip2 - #329
Merged
Merged
Conversation
…wasip2
`target_env = "p2"` is the wasip2 RUST TARGET, not "Component Model Preview 2".
That target links wasi-libc, and wasi-libc's `cabi_realloc` goes through malloc
— which emits `memory.grow`, the thing that makes
`meld fuse --memory shared --address-rebase` reject a component (gale#89,
meld#299) and blocks the single-address-space MCU lowering these components
exist for.
A component does NOT need the wasip2 target to be a valid P2 component.
Measured on falcon-rate, same source, only the target differs:
wasm32-wasip2 component, 0 wasi imports, memory.grow=1, 4674 B
wasm32-unknown-unknown component, 0 wasi imports, memory.grow=0, 3953 B
and the through-wasm closed-loop proof is identical on both (converges 0.193 s,
|err| 0.0059 rad/s). gale provides gust:os/gust:hal, not WASI, so nothing on
this path should link wasi-libc at all.
Make the target per-component rather than global: NOSTD_COMPONENTS lists the
converted ones (today just `rate`) and gets wasm32-unknown-unknown; everything
still on std keeps wasip2, because std needs it. Components join the list as
they are converted — jess's per-stage lowering report (3 skips -> 1 on the
converted rate, both RA-tail helpers cleared) is the priority order.
Follow-up, deliberately NOT bundled here: consuming pulseengine/wit-bindgen's
`cabi-realloc-extern` so `cabi_realloc` delegates to gale's
`__cabi_arena_realloc` — ONE embedder-owned arena per fused image instead of
the per-component arena relay currently carries. That is a wit-bindgen
0.41 -> 0.58 jump AND a crate restructure (wit-bindgen-rt is folded into
wit-bindgen upstream of 0.41), i.e. a migration on the flight path, not a
dependency swap. Tracked separately.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
avrabe
enabled auto-merge (squash)
August 5, 2026 06:20
6 tasks
avrabe
added a commit
that referenced
this pull request
Aug 5, 2026
…P06 (#331) * verify(oci): record the v1.131 no-grow + annotations evidence; defer P06 to v1.132 Code-free. Records three follow-on defects found and fixed since v1.130, each measured on the artifact rather than argued, against the requirement they strengthen (SWREQ-FALCON-OCI-P01, already verified): (v) NO-GROW (#327) — the v1.130 cabi_realloc fix satisfied the ABI with a GROWING allocator, so the shipped component carried `memory.grow`: precisely what makes `meld fuse --memory shared --address-rebase` reject a component (gale#89, meld#299). The fix partly re-blocked the MCU lowering it exists to serve. Replaced with a bounded static work-memory arena; memory.grow 1 -> 0. (vi) ROOT CAUSE — TARGET (#329) — `target_env = "p2"` is the wasip2 RUST TARGET, which links wasi-libc, whose cabi_realloc goes through malloc. A component does not need that target to be a valid P2 component. no_std components now build wasm32-unknown-unknown. (vii) LISTING METADATA (#328) — wasm.directory renders standard OCI MANIFEST ANNOTATIONS, not the embedded package-metadata. Our manifests carried none, so falcon-mixer:1.130.0 listed as "No description available" despite complete crate metadata. Also corrects an explicit claim in docs/OCI-DISTRIBUTION.md. Scope move, explicit: SWREQ-FALCON-MATHF32-P06 (Cody-Waite argument reduction) v1.131 -> v1.132. It is the hardest of the four proofs and is not ready; v1.131 is a fix release whose job is publishing the no-grow components and non-bare listings. Deferring is a decision, not a silent slip. rivet validate: PASS. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG * chore: re-trigger CI to pick up the Verify-Filter scope The gate reads `github.event.pull_request.body` from the EVENT PAYLOAD, not a live fetch, so editing the PR body does not change what a re-run sees — only a new pull_request event does. Empty commit to emit one. Scoping this PR with `Verify-Filter: (has-tag "oci")`: the unscoped ~370-step sweep timed out at 90 minutes TWICE on this two-file artifact change (263 PASS / 0 FAIL both times — out of clock, not out of correctness). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
avrabe
added a commit
that referenced
this pull request
Aug 6, 2026
…ut components (#332) Regression from #329. That PR switched no_std components to build wasm32-unknown-unknown, but the flight-component job's toolchain only installs wasm32-wasip2, so the release failed at: building rate (wasm32-unknown-unknown)... ERROR: no .wasm found I verified #329 locally, where I had run `rustup target add wasm32-unknown-unknown` — and did not check the environment that actually matters. Same class as the wasip1-vs-wasip2 mistake: right property, wrong environment. Add both targets to the job. WHAT THE GUARD DID AND DID NOT CATCH — the fail-loud from #323 worked: the build aborted instead of falling through to a stale artifact, and the ghcr publish was SKIPPED rather than shipping something wrong. Nothing bad was published; ghcr still serves 1.129.0/1.130.0 only. What it could not prevent: `create-release` runs BEFORE `flight-component`, so the v1.131.0 GitHub release was already published (12 assets: binaries, SBOM, sums) and is now missing its wasm components. It is incomplete, not incorrect — consumers pulling components still resolve to 1.130.0. v1.131.0's notes will be marked superseded and the complete release cut as v1.131.1 rather than moving a published tag. Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
target_env = "p2"is the wasip2 rust target, not "Component Model Preview 2". That target links wasi-libc, whosecabi_reallocgoes through malloc →memory.grow→meld fuse --memory shared --address-rebaserejects the component (gale#89, meld#299), blocking the single-address-space MCU lowering these components exist for.A component doesn't need the wasip2 target to be a valid P2 component. Measured on
falcon-rate— same source, only the target differs:wasi:*memory.growwasm32-wasip2wasm32-unknown-unknownClosed-loop proof identical on both (0.193 s, |err| 0.0059 rad/s). gale provides
gust:os/gust:hal, not WASI — nothing on this path should link wasi-libc.What
Target is now per-component:
NOSTD_COMPONENTS(today justrate) buildswasm32-unknown-unknown; everything still on std keeps wasip2, because std needs it. Components join the list as they're converted — jess's per-stage report (3 skips → 1 on the converted rate, both RA-tail helpers cleared) is the priority order.Deliberately not in this PR
Consuming
pulseengine/wit-bindgen'scabi-realloc-extern, socabi_reallocdelegates to gale's__cabi_arena_realloc— one embedder-owned arena per fused image instead of the per-component arena we carry today.That turns out to be wit-bindgen 0.41 → 0.58 plus a crate restructure (
wit-bindgen-rtis folded intowit-bindgen), i.e. a migration on the flight path rather than a dependency swap. Tracked separately so it gets its own review.🤖 Generated with Claude Code