#4236·WasmEdge

feat: Component Model Proposal and WASI Preview 2 in WasmEdge

Author: q82419Created Jul 7, 2025Updated Sep 23, 2026
LabelsWASIWASM-ComponentModel

Currently, all component model PRs will be merged into dev/component after reviewing.

Contribution

To contribute the component-model implmentation, please follow the steps, or the PR would be closed directly.

  1. PR should base on the dev/component branch.
  2. Follow the contribution requirements: linting pass and DCO.

Summary

This issue is for tracking the implmentation status of Component Model proposal and WASI preview 2.

Component Model Implementation

Current implementation status

✅ Full · Partial · ❌ None · — N/A

Partition Load Validate Instantiate Execute
CoreModuleSection
└ Module ✅ ✅ ✅ ✅
CoreInstanceSection
└ Instantiate ✅ ✅ ✅ —
└ InlineExports ✅ ✅ ✅ —
CoreTypeSection
└ RecType ✅ ✅ ✅ —
└ ModuleType ✅ ✅ ✅ —
ComponentSection
└ Component (recursive) ✅ ✅ ✅ ✅
InstanceSection
└ Instantiate ✅ ✅ ✅ —
└ InlineExports ✅ ✅ ✅ —
AliasSection
└ Export ✅ ✅ ✅ —
└ CoreExport ✅ ✅ ✅ —
└ Outer ✅ ✅ ✅ —
TypeSection
└ PrimValType ✅ ✅ ✅ ✅
└ RecordTy ✅ ✅ ✅ ✅
└ VariantTy ✅ ✅ ✅ ✅
└ ListTy ✅ ✅ ✅ ✅
└ TupleTy ✅ ✅ ✅ ✅
└ FlagsTy ✅ ✅ ✅ ✅
└ EnumTy ✅ ✅ ✅ ✅
└ OptionTy ✅ ✅ ✅ ✅
└ ResultTy ✅ ✅ ✅ ✅
└ OwnTy ✅ ✅ ✅ ✅
└ BorrowTy ✅ ✅ ✅ ✅
└ MapTy ✅ ✅ ✅ ✅
└ StreamTy ✅ ✅ ✅ ✅
└ FutureTy ✅ ✅ ✅ ✅
└ FuncType ✅ ✅ ✅ —
└ ComponentType ✅ ✅ ✅ —
└ InstanceType ✅ ✅ ✅ —
└ ResourceType ✅ ✅ ✅ —
CanonSection
└ lift ✅ ✅ ✅ ¹ ✅
└ lower ✅ ✅ ✅ ¹ ✅
└ resource.new ✅ ✅ ✅ ✅
└ resource.drop ✅ ✅ ✅ ✅
└ resource.rep ✅ ✅ ✅ ✅
└ backpressure.inc / backpressure.dec ✅ ✅ ✅ ✅
└ task.return / task.cancel ✅ ✅ ✅ ✅
└ context.get / context.set ✅ ✅ ✅ ✅
└ yield ✅ ✅ ✅ ✅
└ subtask.* ✅ ✅ ✅ ✅
└ stream.* ✅ ✅ ✅ ✅
└ future.* ✅ ✅ ✅ ✅
└ error-context.* ✅ ✅ ✅ ✅
└ waitable-set.* ✅ ✅ ✅ ✅
└ waitable.join ✅ ✅ ✅ ✅
└ thread.index / thread.new-indirect / thread.resume-later ✅ ✅ ✅ ✅
└ thread.suspend / thread.{suspend,yield}-then-{resume,promote} ✅ ✅ ✅ ✅
└ thread.spawn_ref / thread.spawn_indirect / thread.available_parallelism ✅ ❌ ² ❌ ² ❌ ²
StartSection
└ Start ✅ ✅ ✅ ✅
ImportSection
└ Import ✅ ✅ ³ —
ExportSection
└ Export ✅ ✅ ✅ —
ValueSection
└ Value ✅ ✅ ✅ ✅

¹ The canonical ABI over a 64-bit linear memory validates, but instantiation still rejects it with "canonical ABI over a 64-bit memory is not implemented". ² The shared-everything-threads (②) built-ins are decoded by the loader, and the validator rejects them as not supported yet. That proposal is out of scope for this PR. ³ Every sort is wired at runtime — func, type, instance, component, and core module — and an abstract resource import mints a fresh opaque host identity. The value sort has no host-side provider, so a value import is still rejected as not found.

Current spec tests passing status (base on PR 5170)

WasmEdge used the tests from wasm-tools on component-model proposal repo for the spec tests. The test suites are converted into the json+wasm files under the component-model folder of WasmEdge-spectest repo.

✅ Pass · — Not covered by this suite · ❌ Fail

Test Name load, malformed validate, invalidate instantiate, module_define invokation
component-model-binary (test/binary)
└ binary.wast ✅ ✅ ✅ —
component-model-validation (test/validation)
└ abi.wast ✅ ✅ ✅ —
└ annotated-names.wast ✅ ✅ ✅ —
└ attributes.wast ✅ ✅ — —
└ core-modules.wast ✅ ✅ — —
└ defined-types.wast ✅ ✅ ✅ —
└ extern-names.wast ✅ ✅ — —
└ external-visibility.wast ✅ ✅ — —
└ indicies.wast ✅ ✅ ✅ —
└ instantiation.wast ✅ ✅ ✅ —
└ kebab.wast ✅ ✅ ✅ —
└ outer-alias.wast ✅ ✅ — —
└ resources.wast ✅ ✅ ✅ —
component-model-resources (test/resources)
└ borrows.wast ✅ ✅ ✅ ✅
└ handle-table.wast ✅ ✅ ✅ ✅
└ multiple-resources.wast ✅ ✅ ✅ ✅
component-model-linking (test/linking)
└ link-time-virtualization.wast ✅ ✅ ✅ ✅
└ shared-everything-dynamic-linking.wast ✅ ✅ ✅ ✅
└ tags.wast ✅ ✅ ✅ ✅
└ unit.wast ✅ ✅ ✅ ✅
component-model-async (test/async)
└ async-calls-sync.wast ✅ ✅ ✅ ✅
└ big-interleaving-test.wast ✅ ✅ ✅ ✅
└ builtin-trap-poisons-instance.wast ✅ ✅ ✅ ✅
└ cancel-stream.wast ✅ ✅ ✅ ✅
└ cancel-subtask.wast ✅ ✅ ✅ ✅
└ cancellable.wast ✅ ✅ ✅ ✅
└ closed-stream.wast ✅ ✅ ✅ ✅
└ cross-abi-calls.wast ✅ ✅ ✅ ✅
└ cross-task-future.wast ✅ ✅ ✅ ✅
└ deadlock.wast ✅ ✅ ✅ ✅
└ dont-block-start.wast — — ✅ —
└ drop-cross-task-borrow.wast ✅ ✅ ✅ ✅
└ drop-stream.wast ✅ ✅ ✅ ✅
└ drop-subtask.wast ✅ ✅ ✅ ✅
└ drop-waitable-set.wast ✅ ✅ ✅ ✅
└ during-sync-call-may-block-if-other-ready-threads.wast ✅ ✅ ✅ ❌ ¹
└ during-sync-call-no-exclusive-resume.wast ✅ ✅ ✅ ❌ ¹
└ during-sync-call-no-sibling-resume.wast ✅ ✅ ✅ ❌ ¹
└ empty-wait.wast ✅ ✅ ✅ ✅
└ futures-must-write.wast ✅ ✅ ✅ ✅
└ partial-stream-copies.wast ✅ ✅ ✅ ✅
└ passing-resources.wast ✅ ✅ ✅ ✅
└ same-component-stream-future.wast ✅ ✅ ✅ ✅
└ sync-barges-in.wast ✅ ✅ ✅ ✅
└ sync-streams.wast ✅ ✅ ✅ ✅
└ trap-if-block-and-sync.wast ✅ ✅ ✅ ✅
└ trap-if-done.wast ✅ ✅ ✅ ✅
└ trap-if-sync-and-waitable-set.wast ✅ ✅ ✅ ✅
└ trap-if-transfer-in-waitable-set.wast ✅ ✅ ✅ ✅
└ trap-on-reenter.wast ✅ ✅ ✅ ✅
└ validate-no-async-abi-for-sync-type.wast — ✅ — —
└ validate-no-stream-char.wast — ✅ — —
└ wait-during-callback.wast ✅ ✅ ✅ ✅
└ zero-length.wast ✅ ✅ ✅ ✅
component-model-values (test/values)
└ alignment.wast ✅ ✅ ✅ ✅
└ concat.wast ✅ ✅ ✅ ✅
└ numerics.wast ✅ ✅ ✅ ✅
└ post-return.wast ✅ ✅ ✅ ✅
└ realloc.wast ✅ ✅ ✅ ✅
└ strings.wast ✅ ✅ ✅ ✅
└ transcode.wast ✅ ✅ ✅ ✅
└ variants.wast ✅ ✅ ✅ ✅

¹ Listed in the upstream test/nyi.txt: no engine implements these yet. They need a spawned thread to stay alive across two separate host calls, which the teardown at the outermost embedder invoke does not support.

Tracking issues for phases

  1. Spec tests architecture
    • #4695
    • #4712
  2. Loader
    • #4276
    • #4702
  3. Validator
    • #4441
  4. Instantiation and Executor
    • #4711

WASI Preview2

We are working on architecture tests for the WASI 0.2 API. We plan to implement wasi-random and wasi-clocks first for validation before rolling out the full implementation.

WASI 0.2 APIs Status
wasi-io ❌
wasi-clocks ❌
wasi-random ❌
wasi-filesystem ❌
wasi-sockets ❌
wasi-cli ❌
wasi-http ❌

Recent Spec Binary Format Changes

We follow the latest Component Model spec. The binary format changes below landed in the spec after the loader implementation was completed (spec 706074c, 2026-07-22).

Date Spec commit Binary change
2026-07-23 1d20b88 (WebAssembly/component-model#655) ft of thread.new-indirect (0x27), thread.spawn-ref (0x40), and thread.spawn-indirect (0x41) is a core:typeidx (same bytes, different index space)
2026-07-26 d6b48f2 (WebAssembly/component-model#683) Remove backpressure.set (canon 0x08)
2026-08-17 dff1181 (WebAssembly/component-model#698) resourcetype (0x3f) rep and context.get (0x0a) / context.set (0x0b) type become <core:valtype>
2026-08-31 a70dae6 (WebAssembly/component-model#712) Value encoding for fixed-length (list t len) and (map k v) ( value section)
2026-09-04 8892da0 (WebAssembly/component-model#716) Remove the cancel? immediate: waitable-set.wait (0x20), waitable-set.poll (0x21), thread.yield (0x0c), thread.suspend (0x29), and thread.{suspend,yield}-then-{resume,promote} (0x2a–0x2d) carry a reserved 0x00 byte
2026-09-18 1a743de (WebAssembly/component-model#717) Add ➡️ stream.forward (0x2e) and future.forward (0x2f)

Appendix

Previous issues:

  1. Loader:
    • Previous c
    • #4123
    • #4127
    • #4148
    • #4162
    • #4173
  2. Validator:
    • #4044
    • #3150
    • #4173
    • #4268
    • #4442
    • #4528
    • #4529
    • #4601
    • #4612
  3. Executor
    • #3151
    • #4275
    • #4321
    • #4333
    • #4334
  4. Fix or related PRs
    • #4287
  5. Tests
    • #4444
    • #4625
    • #4666
    • #4667
  6. Previous component model issue: #2943
  7. Previous WASI preview2 issue: #2939