BrowserPod 3.0 runs Rust BrowserPod 3.0 runs unmodified Rust programs in the browser Announcement
Using a coding agent? Not sure where to start? Talk to us
Sign up for Edge Get an Edge API key, with 1,000 free hours Contact us Talk to the team

Docs and playgrounds people can run

BrowserPod is a microVM that runs in the browser. Put a real terminal and real runtimes in your docs and playgrounds, so developers run your examples instead of copying them out.

Why runnable examples work

Code samples in docs are usually copied, pasted and run somewhere else, and that's where readers drop off. BrowserPod lets them run the sample in the page, on the real runtime, with the files already in place.

Each reader's pod runs on their own device, so a launch-day spike costs you nothing and never queues. Pods start without downloading a full image.

The library is free for open-source projects and everyone else. When examples need npm, GitHub or an API, open-source projects can apply for a grant for BrowserPod Edge.

What you need to know

Two headers on your docs site

Serve the pages that run pods with Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp.

Start with BrowserCode

If you'd rather not build an embed yet, BrowserCode links and embeds give readers a runnable example today.

What people build

01

Runnable API references

Every example in the reference runs in place, against the real library.

02

Step-by-step tutorials

Each step seeds the files it needs, so readers pick up exactly where the text is.

03

Library playgrounds

Your package installed and an example running on load, ready to edit.

04

Interactive blog posts

Readers run and change the code in the post instead of cloning a repository.

What your readers get

The real tools, in the page, with nothing to install and nothing for you to host.

From snippet to playground

  1. Add the package

    npm i @leaningtech/browserpod in your docs site.

  2. Set two headers

    Serve the page cross-origin isolated with COOP and COEP.

  3. Seed the files

    Write the example's files into the pod when the page loads.

  4. Let readers run it

    Attach a terminal and let them run, edit and break things safely.

A runnable example

Seed the example into the pod and open a shell in it, right where the reader is.

app.js
import { BrowserPod } from "@leaningtech/browserpod";

const pod = await BrowserPod.boot();
const terminal = await pod.createDefaultTerminal(document.querySelector("#example"));

const file = await pod.createFile("/home/user/hello.js", "utf-8");
await file.write(`console.log("Edit me and run node hello.js");`);
await file.close();

await pod.run("bash", [], { terminal, cwd: "/home/user" });

Questions

Is it free for open-source docs?

Yes. The library is free for any use, and open-source projects can apply for a grant for BrowserPod Edge.

Do readers need an account?

No. Pods run in their browser with no sign-up.

Can readers break something?

Only their own pod. Each reader's examples run in their own browser, apart from your site and from every other reader.

Can I link to a runnable example instead of embedding one?

Yes. BrowserCode links and embeds are free and unlimited, so you can point readers at a runnable example without building anything.

Can we self-host BrowserPod?

Yes. Enterprise covers self-hosting the runtime and the network stack, vendoring it into your build and redistributing it in your product.

Stay informed with BrowserPod news

BrowserCode: a browser-based coding playground, powered by WebAssemblyBrowserCode is a free, open source, fully client-side coding playground. Open a tab, pick a template, clone a repo or pick an agent and start building. No account, no installs, no servers, no setup. Ana GabySoftware Engineer @ Leaning TechnologiesBeyond WASI: Running any Rust application in the browser with BrowserPod 3.0BrowserPod can now run real Rust programs in the browser, compiled from unmodified source with stock rustc and cargo. Yuri IozzelliSenior Software Engineer @ Leaning TechnologiesA Linux-like kernel in a browser tab - deep dive in the BrowserPod architectureHow the BrowserPod kernel supports running many Linux applications concurrently in the browser using WebAssembly. Alessandro PignottiCTO @ Leaning TechnologiesBrowserPod 2.0: in-browser WebAssembly sandboxes. Run git, bash, node, python...BrowserPod 2.0 ships with a real bash shell, git, and core Linux utilities. Yuri IozzelliSenior Software Engineer @ Leaning TechnologiesBrowserPod: universal in-browser sandbox powered by Wasm (starting with Node.js)Stefano De Rossi, Alessandro PignottiCEO @ Leaning TechnologiesBrowserPod: WebAssembly in-browser code sandboxes for Node, Python, and RailsBrowserPod Beta is live: zero latency in-browser code sandboxes in WebAssembly for Node, Python and Rails. Alessandro Pignotti, Stefano De RossiCTO @ Leaning TechnologiesBrowserPod: In-browser full-stack environments for IDEs and Agents via WasmBrowserPod is a WebAssembly-based, client-side container that brings full-stack dev environments to the browser, ideal for web IDEs, docs, and AI agents.Alessandro Pignotti, Stefano De RossiCTO @ Leaning Technologies