This is an example VS Code extension that uses the VS Code wasm-wasi
host to run a .NET WASI WebAssembly module.
- .NET 8 Preview 6 or later
- Install the (experimental!) dotnet wasi workload:
dotnet workload install wasi-experimental
- Install the official WASI SDK from https://github.com/WebAssembly/wasi-sdk/releases
- Set the
WASI_SDK_PATH
environment variable to point to the place where you put the WASI SDK
% cd vscode
% npm install
% npm run build
- Open this folder in VS Code
- Press "F5" with the "Launch Extension" configuration
- in the
[Extension Development Host]
window, press Ctrl-Shift-P (or Cmd-Shift-P) and runwasm: run .NET WASI Program
A console should pop up with a message:
% cd vscode
% npm run test-browser
A browser window will open with a local instance of VS Code for the Web. press Ctrl-Shift-P and run wasm: run .NET WASI Program
A console should pop up with a message: