Observation
After meld fuse of two components whose interface is fully resolved internally (app imports gale:kernel, host exports it → fused core has 0 remaining gale:kernel imports), the fused core still exports cabi_realloc (×2, one per input) and still contains memory.grow (×2):
(export "cabi_realloc" (func 13))
(export "cabi_realloc$1" (func 32))
memory.grow occurrences: 2
Those cabi_realloc functions (wit-bindgen canonical-ABI realloc, backed by Rust dlmalloc → sbrk → memory.grow) exist to marshal data across the component boundary — which fusion has just removed. They're vestigial. Because they're exports, loom can't DCE them, so the allocator + memory.grow survive.
Consequence
This is what blocks the lean MCU path: meld fuse --memory shared --address-rebase fails with "memory.grow not supported with address rebasing" — solely because of the dead canonical-ABI allocator. (The user's logic: meld fusion should make the per-component adapter unnecessary; right now it keeps it.)
Ask
When fusion internalizes the inter-component boundary and the remaining external surface is scalar/flat (no realloc-requiring lifts), meld should de-export / drop the now-internal cabi_realloc and canonical-ABI adapter functions (or mark them internal so loom DCEs them). Then dlmalloc/sbrk/memory.grow DCE away → --memory shared becomes viable → one lean single-address-space core for synth (target the wasm-dist 544 B class, not tens of KB).
Kill-criterion
"After meld fuse of an all-scalar-boundary component pair, cabi_realloc is still exported / memory.grow still present in the fused core" → not fixed.
Repro: crates/gale-app-demo/dissolve.sh on gale@feat/kiln-dissolve-libos. Relates: gale#89 (the gale-side tracking; the grow is NOT gale code — it's the canonical-ABI adapter meld should drop on fusion).
Observation
After
meld fuseof two components whose interface is fully resolved internally (app importsgale:kernel, host exports it → fused core has 0 remaininggale:kernelimports), the fused core still exportscabi_realloc(×2, one per input) and still containsmemory.grow(×2):Those
cabi_reallocfunctions (wit-bindgen canonical-ABI realloc, backed by Rustdlmalloc → sbrk → memory.grow) exist to marshal data across the component boundary — which fusion has just removed. They're vestigial. Because they're exports, loom can't DCE them, so the allocator +memory.growsurvive.Consequence
This is what blocks the lean MCU path:
meld fuse --memory shared --address-rebasefails with "memory.grow not supported with address rebasing" — solely because of the dead canonical-ABI allocator. (The user's logic: meld fusion should make the per-component adapter unnecessary; right now it keeps it.)Ask
When fusion internalizes the inter-component boundary and the remaining external surface is scalar/flat (no realloc-requiring lifts), meld should de-export / drop the now-internal
cabi_reallocand canonical-ABI adapter functions (or mark them internal so loom DCEs them). Thendlmalloc/sbrk/memory.growDCE away →--memory sharedbecomes viable → one lean single-address-space core for synth (target the wasm-dist 544 B class, not tens of KB).Kill-criterion
"After
meld fuseof an all-scalar-boundary component pair,cabi_reallocis still exported /memory.growstill present in the fused core" → not fixed.Repro:
crates/gale-app-demo/dissolve.shon gale@feat/kiln-dissolve-libos. Relates: gale#89 (the gale-side tracking; the grow is NOT gale code — it's the canonical-ABI adapter meld should drop on fusion).