GitXplorerGitXplorer
l

sample-dotnet-wasi-vscode

public
11 stars
1 forks
0 issues

Commits

List of commits on branch main.
Verified
f4592d208f0afcb0828b7996edd5367264aeb775

Add a .devcontainer

mmichaelp committed a year ago
Unverified
7b798eeed97d324d81ec01132135d23affa94604

add package command

llambdageek committed a year ago
Unverified
f262474aa9c2d5678582e46e35c5fbb06bee90a3

add devDep vsce, .vscodeignore

llambdageek committed a year ago
Unverified
9b03261e3fd629a282112351bf11058f98df5875

Add Web version of the extension

llambdageek committed a year ago
Verified
cac061c876a541fd4a4a102e95e604cee273b7d0

Update README.md

llambdageek committed a year ago
Unverified
6531f200adb83e198a25e403acdb2124a1bd9456

update README

llambdageek committed a year ago

README

The README file for this repository.

VS Code extension using .NET WASI

This is an example VS Code extension that uses the VS Code wasm-wasi host to run a .NET WASI WebAssembly module.

Prerequisites

  • .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

Building

% cd vscode
% npm install
% npm run build

Running the Desktop Extension

  1. Open this folder in VS Code
  2. Press "F5" with the "Launch Extension" configuration
  3. in the [Extension Development Host] window, press Ctrl-Shift-P (or Cmd-Shift-P) and run wasm: run .NET WASI Program

A console should pop up with a message:

screenshot Hello, Wasi Console

Runnning the Web Extension

% 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:

screenshot Hello, Wasi Console in a browser