You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a standalone WebAssembly host interoperability example #661
documentationIssues or enhancements related to the documentation.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
examples/wasm_module.wave exercises many WebAssembly backend features at once and is used by CI smoke tests. It includes extern(c) and export(c) host boundaries, but there is no small self-contained example showing how a JavaScript host actually provides and calls those functions.
Scope
Add a small WebAssembly interoperability example under examples/ with a Wave module and a minimal JavaScript host, preferably using Node.js and no third-party packages.
The example should demonstrate:
importing one host function through extern(c, "...");
exporting one Wave function through export(c, "...");
instantiating the generated .wasm file from JavaScript;
providing the required env import object;
calling the Wave export and checking a deterministic result.
Keep this separate from the existing WebAssembly smoke module rather than expanding that file further. Missing-host-import diagnostics remain tracked separately by #453.
Completion criteria
The Wave source passes wavec check and builds for wasm32-unknown-unknown.
The JavaScript host runs with the Node.js version already used by CI and requires no npm dependencies.
The host supplies the imported function and successfully calls the exported Wave function.
A short README or examples index entry includes the exact build and run commands.
Existing wasm_module.wave, wasm_run.wave, and WASI smoke coverage remain unchanged.
documentationIssues or enhancements related to the documentation.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Activity