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

Process isolation

Every process in its own Worker

BrowserPod's Linux-like kernel runs each process in its own Web Worker with its own memory, so programs stay apart and a crash in one doesn't take down the rest.

Real processes, not a shim

01

One Worker per process

Every process and every thread gets its own Web Worker, and the kernel is present in each one.

02

Separate memory

Processes have their own WebAssembly memory. Threads of one process share theirs, as they would on Linux.

03

Linux semantics

fork and exec, signals and handlers, futexes and ptys, through standard-named Linux syscalls.

04

Crashes stay contained

A process that fails takes nothing else down with it. The shell, the server and the build keep running.

How processes work

BrowserPod's kernel is a WebAssembly module present in every Web Worker. It exposes standard-named Linux syscalls, and programs compiled for BrowserPod import them, the way a Linux program calls into the Linux kernel. The result is one coherent system, with a shared filesystem, devices, sockets and ptys.

Each process gets its own Worker and its own WebAssembly memory, so one process can't read or write another's. Threads of the same process share a memory object across Workers, which is what lets multithreaded programs run.

Because these are real processes, whole systems work. npm install spawns its scripts, a dev server runs beside its file watcher, and bash runs pipelines. Scheduling is left to the device's operating system, which spreads the Workers across its cores.

What you need to know

Programs are compiled for BrowserPod

Binaries are built with Cheerp for the wasm32-browserpod-linux target. Node.js is the real Node.js compiled this way, and Rust support is in the standard library.

Run whole systems

A dev server, a watcher and a shell can all run at once, as separate processes on one kernel.

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

// Boot a pod, no API key needed
const pod = await BrowserPod.boot();
const terminal = await pod.createDefaultTerminal(document.querySelector("#console"));

// Several processes, one system
await pod.run("bash", ["-c", "node server.js & node worker.js & wait"], {
  terminal,
  cwd: "/home/user/app",
});

Questions

Is this the Linux kernel?

No. It is our own kernel, written for WebAssembly, with Linux-compatible syscalls. The programs on it are Linux programs, compiled from unmodified source.

Do multithreaded programs work?

Yes. Threads of one process share a memory object across Workers, as threads share memory on Linux.

Can a crashing program take down the pod?

No. A failed process ends on its own, and the kernel and every other process keep running.

Can I run my own programs?

Yes, once they're compiled for BrowserPod's WebAssembly target. Node.js scripts run as they are, and Rust and C/C++ programs build for the target. Prebuilt native binaries need a Wasm build.

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