Goal
Stop carrying a per-component allocator. cabi_realloc should delegate to gale's __cabi_arena_realloc via pulseengine/wit-bindgen's cabi-realloc-extern feature — one embedder-owned arena across the fused image, which is that fork's design (pulseengine/wit-bindgen#4) and gale's (gale#89).
Where we are
Why it's a migration, not a dependency swap
|
version |
rt crate |
the fork (integration/embedded-rt-no-grow) |
wit-bindgen 0.58.0 |
no separate wit-bindgen-rt — rt is a module inside wit-bindgen |
| relay's components |
wit-bindgen-rt 0.41.0 |
separate crate |
So it's 0.41 → 0.58 plus a crate restructure, which pulls in cargo-component compatibility and regenerated bindings — on the flight path.
Open design question to settle first
With cabi-realloc-extern, __cabi_arena_realloc is embedder-provided. Does the published component then carry an unresolved import only gale satisfies? If so, the published artifact would no longer run standalone in wasmtime — which our tests/rate-loop-proof and any host-side composition test depend on.
Likely answer is two build modes (host build keeps the default allocator; gale build uses the extern arena), which is how the fork frames it — "it's a runtime-crate build mode". Needs verifying before we migrate, not after, because it decides what we publish to ghcr for jess to pull.
Acceptance
Refs: pulseengine/wit-bindgen#4, gale#89, meld#299, jess#167.
🤖 Generated with Claude Code
Goal
Stop carrying a per-component allocator.
cabi_reallocshould delegate to gale's__cabi_arena_reallocviapulseengine/wit-bindgen'scabi-realloc-externfeature — one embedder-owned arena across the fused image, which is that fork's design (pulseengine/wit-bindgen#4) and gale's (gale#89).Where we are
wasm32-unknown-unknown, not wasip2. That's the prerequisite:target_env != "p2", so the fork's feature applies at all.lol_alloc, killingmemory.grow(1 → 0). Explicitly interim.Why it's a migration, not a dependency swap
integration/embedded-rt-no-grow)wit-bindgen-rt—rtis a module insidewit-bindgenwit-bindgen-rt0.41.0So it's 0.41 → 0.58 plus a crate restructure, which pulls in cargo-component compatibility and regenerated bindings — on the flight path.
Open design question to settle first
With
cabi-realloc-extern,__cabi_arena_reallocis embedder-provided. Does the published component then carry an unresolved import only gale satisfies? If so, the published artifact would no longer run standalone in wasmtime — which ourtests/rate-loop-proofand any host-side composition test depend on.Likely answer is two build modes (host build keeps the default allocator; gale build uses the extern arena), which is how the fork frames it — "it's a runtime-crate build mode". Needs verifying before we migrate, not after, because it decides what we publish to ghcr for jess to pull.
Acceptance
cabi-realloc-externyields an unresolved import; decide what the published artifact isfalcon-ratebuilds with no relay-side allocator, still a component, 0 WASI, 0memory.growtests/rate-loop-proofstill closes the loop (0.193 s, |err| 0.0059 rad/s baseline)wasm/cm/rate/src/lib.rsfuse --memory shared --address-rebaseaccepts the result — the actual kill-criterion in gale#89Refs: pulseengine/wit-bindgen#4, gale#89, meld#299, jess#167.
🤖 Generated with Claude Code