WebAssembly and WASI

WebAssembly support in the operational LLVM compiler is currently an object-emission target, not a hosted application platform.

Current declared level

The canonical Gate 14 matrix declares wasm32-wasi at these levels:

Capability Status
Parse and semantic checks supported
LLVM IR emission supported
Object emission supported
Static or dynamic seed libraries not supported
Executable/module linking not supported
Hosted execution not supported
WASI runtime services not implemented
FFI, scheduler, and package artifacts not supported

The compiler's broader target smoke also exercises wasm32-freestanding IR and object emission. That smoke does not establish a stable browser ABI, JavaScript bindings, WASI command runtime, or runnable module contract.

Emitting an object

Use the direct compiler for the currently declared capability:

seed/compiler/llvm/build/seed \
  --target wasm32-wasi \
  --emit-object app.o \
  app.sd

LLVM IR can be inspected without linking:

seed/compiler/llvm/build/seed \
  --target wasm32-wasi \
  --emit-llvm app.ll \
  app.sd

These commands produce compiler artifacts only. The repository does not currently promise that app.o can be linked and run as a WASI command.

Not currently defined

The operational compiler does not yet define a stable WebAssembly contract for:

Do not reuse helper exports, pointer/length conventions, or runner commands from superseded compiler documentation as current behavior.

Closure requirements

WebAssembly becomes an application target only when its declared matrix row is expanded and backed by tests for linking, execution, runtime services, ABI, ownership across imports/exports, diagnostics, and package artifacts. Until then, describe it precisely as LLVM IR/object support.

The authoritative capability row is seed/compiler/llvm/tests/GATE14_TARGET_MATRIX.tsv; planned work belongs in seed/compiler/llvm/ROADMAP.md.