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

Real C++, in the browser tab

Compile unmodified C and C++ source targeting BrowserPod, then run the binary in a pod on your user’s device. Node.js itself reaches the browser this way, built from its C++ source.

$npm i @leaningtech/browserpod
hello.cppC++
1#include <stdio.h>
2
3struct Greeter {
4    const char* who;
5    void hello() const {
6        printf("Hello, %s, from C++ 👋\n", who);
7    }
8};
9
10int main(int argc, char** argv) {
11    Greeter{argc > 1 ? argv[1] : "BrowserPod"}.hello();
12
13    auto square = [](int n) { return n * n; };
14    long version = __cplusplus / 100 % 100;
15    int n = square(12);
16    printf("C++%ld says 12 squared is %d\n", version, n);
17}
bashC++
Starting BrowserPod…

From clang++ to a running pod

Build on your machine, serve the binary with your web app and copy it into the pod.

  1. 1Install the toolchain

    Use the deb package, the macOS or Windows installer, or build it from source.

    cheerp.io
  2. 2Compile

    Target the BrowserPod platform with clang++.

    $ /opt/cheerp/clang++ hello.cpp -o hello \ --target=wasm32-browserpod-linux
  3. 3Serve the binary

    Put the binary in your web app’s public folder.

    $ cp hello public/
  4. 4Run it in a pod

    Fetch the binary, write it to the pod with createFile and run it.

    pod.run("/hello", [], { terminal })

Hello, World! in C++

A standard C++ program, compiled on your machine. The 184K binary goes into your public folder, ready to copy into a pod.

terminal on your machineC++
1$ cat hello.cpp
2#include <iostream>
3
4int main() {
5    std::cout << "Hello, World!\n";
6}
7
8$ /opt/cheerp/clang++ hello.cpp -o hello \
9  --target=wasm32-browserpod-linux
10$ ls -lh hello
11-rwxr-xr-x  1 you  staff   184K hello
12
13$ cp hello public/

What every pod includes

Your C++ binary runs in the same pod as Node.js, with the same command line beside it.

Runs on the user’s device

Each pod runs inside the browser tab, on the user’s own machine.

Isolated from the host

A dedicated syscall layer keeps the pod apart from the host operating system.

Command-line tools included

bash, git, coreutils and more are ready in every pod.

Storage you choose

Pods are ephemeral by default. Pass a storageKey to keep files between sessions.

Get started

Install BrowserPod from npm and boot your first pod.

$npm i @leaningtech/browserpod

Need public URLs, GitHub or TCP from a pod? Add an API key for BrowserPod Edge, free for 1,000 hours a month.Get an API key

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