Parent: #8506
Problem
The complete OpenCode graph uses WebAssembly in several real feature paths:
@silvia-odwyer/photon-node for image processing, including file-style WASM imports
web-tree-sitter plus Bash/PowerShell and downloadable language grammar modules
@pierre/diffs worker/WASM assets
Perry has a WebAssembly host and previously completed #5234/#6558, but the full-source target needs the complete combination of runtime APIs, wasm-bindgen glue, dynamic grammar loading, and output asset packaging. A Photon-only native replacement would not cover tree-sitter's arbitrary grammar modules.
Scope
WebAssembly.Module, Instance, Memory, Table, globals, imports, and exports
- sync and async compile/instantiate shapes used by these packages
- wasm-bindgen glue and its JS↔WASM import cycle
import ... from "./x.wasm" and with { type: "file" }
- embedding/copying WASM assets into the native output with stable runtime paths
- actionable compile errors for unsupported WASM forms; never silently defer to a JS engine
Acceptance
Parent: #8506
Problem
The complete OpenCode graph uses WebAssembly in several real feature paths:
@silvia-odwyer/photon-nodefor image processing, including file-style WASM importsweb-tree-sitterplus Bash/PowerShell and downloadable language grammar modules@pierre/diffsworker/WASM assetsPerry has a WebAssembly host and previously completed #5234/#6558, but the full-source target needs the complete combination of runtime APIs, wasm-bindgen glue, dynamic grammar loading, and output asset packaging. A Photon-only native replacement would not cover tree-sitter's arbitrary grammar modules.
Scope
WebAssembly.Module,Instance,Memory,Table, globals, imports, and exportsimport ... from "./x.wasm"andwith { type: "file" }Acceptance
web-tree-sittersmoke test loads a grammar and parses source