Files
vscode-extension-samples/wasm-component-model-resource
matt rice 22bb244c0b Fix esbuild scripts
In 9fb82e1fb8 the esbuild key in the scripts
section was set to an esbuild version, this reverts that portion of the change.
2025-03-11 11:25:34 -07:00
..
2024-05-07 16:12:01 +02:00
2024-05-07 16:12:01 +02:00
2024-10-28 16:41:49 -07:00
2024-05-07 16:12:01 +02:00
2024-05-07 16:12:01 +02:00
2024-05-07 16:12:01 +02:00
2024-05-07 16:12:01 +02:00
2025-03-11 11:25:34 -07:00
2024-08-26 11:20:50 +02:00
2024-05-07 16:12:01 +02:00

WASM Component Model Example

An example demonstrating how to use component model resources to integrate WebAssembly code into VS Code.

Functionality

Defines a resource that implements a calculator supporting the reverse Polish notation, similar to those used in Hewlett-Packard hand-held calculators.

Pre-requisites

To run the sample the following tool chains need to be installed

  • Rust: installation instructions can be found here
  • wasm-tools: releases can be found here. You need at least version >= 1.200 to run the example.

Running the Sample in the Desktop

  • Run npm install in this folder. This installs all necessary npm modules.
  • Open VS Code on this folder.
  • Execute the launch config Run Example.

Running the Sample in the Web

As a pre-requisite follow the instructions here to generate necessary certificate to side load the extension into vscode.dev or insiders.vscode.dev.

Then compile the extension for the Web by running npm run esbuild, start a local extension server using npm run serve, open vscode.dev or insiders.vscode.dev in a browser and execute the command Install Extension from Location. As a location use https://localhost:5000.