Skip to main content

Using the Browser Runtime SDK

1. Install the Javascript library

Install via npm:

npm install @extism/runtime-browser

2. Include the library and use the APIs

// import or require (depending on your module system)
import { ExtismContext } from "@extism/runtime-browser"

// You can load raw wasm bytes from file, request, etc
const manifest = { wasm: [{ data: "..." }] };

// Or you can pass in a path to a wasm file
// this is our count-vowels example plugin
const manifest = { wasm: [{ path: "" }] };

const ctx = new ExtismContext();
const plugin = await ctx.newPlugin(manifest);

// call the function 'count_vowels' defined in the wasm module
let output = await'count_vowels', 'this is a test');

console.log(JSON.parse(new TextDecoder().decode(output)));

Current Plug-in Support

Limited Support

extism_http_request and WASI PDK functionality is currently unavailable, but please reach out on Discord or open an issue on the Extism GitHub repository to let us know you'd like to see them supported.


The Extism Playground is built using the Browser Runtime SDK, and its source code is available -- please test it out and use the Playground codebase as a reference in case it is helpful.

Need help?

If you've encountered a bug or think something is missing, please open an issue on the Extism GitHub repository.

There is an active community on Discord where the project maintainers and users can help you. Come hang out!