Skip to content

Lean library-OS dissolve: gale components must be no_std/no-grow so meld can shared-fuse (single-address-space MCU lowering) #89

Description

@avrabe

Correction of the dissolve pipeline (supersedes the synth mis-route)

The canonical dissolve is meld fuse → loom → synth, not wac compose + wasm-tools unbundle (which I wrongly used in PR#88 — it preserves per-component adapters and yields two ~24 KB adapter-laden cores). meld is the fusion stage: it resolves imports, merges index spaces, and generates the canonical-ABI adapter at build time into one monolithic core, which is what loom/synth want.

The actual blocker (= the no_std/no_alloc point)

meld fuse --memory shared --address-rebase (the MCU single-address-space mode) fails:

unsupported component feature: memory.grow not supported with address rebasing

Both gale-app-demo and gale-kiln carry memory.grow (1 each) — the default Rust/wit-bindgen wasip2 allocator. The multi-memory fallback isn't MCU-lowerable (2 memories, 1088 KB each; synth loud-skips the cross-memory copies per #369 — correct behavior).

Fix (gale side)

Build the gale application + host components #![no_std] with a static/bump allocator that never grows (no memory.grow) — the same no_std/no_alloc discipline the payload already follows. Then:
meld fuse --memory shared --address-rebase → single lean core (no per-component adapter, scalar ABI ⇒ no cabi_realloc needed) → loom DCE → synth → one MCU library-OS .o (target the wasm-dist 544 B-class, not 24 KB).

Kill-criterion

"With no-grow components, meld fuse --memory shared still fails / the synth'd single core still exceeds a few KB of adapter" → not fixed.

Supersedes the FIND-BYOOS-006 framing; corrects PR#88. Relates: gale#74, the no_std/no_alloc seam (wit/README), meld fusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions