Skip to content

runtime/AOT: support OpenCode's WebAssembly modules and packaged .wasm assets #8508

Description

@proggeramlug

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvementparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions