untainer
Get started

Comparison

How untainer compares with Docker, WebContainers, PGlite and container2wasm: what each runs, and where.

Where untainer sits next to tools that also run software that is not JavaScript, or not native, on a developer's machine or in a browser. A short, factual comparison: what each runs, and where.

untainerDockerWebContainersPGlitecontainer2wasm
RunsOCI images (linux/arm64)OCI imagesNode.js applications, not container imagesPostgres onlyOCI images (amd64 and riscv64; others with an extra QEMU user emulation)
In a browseryesnoyesyesyes
In Nodeyesthrough a daemonnoyesthrough a WASI runtime (wasmtime, wazero...)
HowLinux kernel compiled to WebAssembly, aarch64 user space emulatednative Linux (a VM on macOS and Windows)a runtime for Node.js inside the tab; needs cross-origin isolationPostgres compiled to WebAssembly, a library with one connectiona machine emulator compiled to WebAssembly (Bochs for x86_64, TinyEMU for RISC-V, QEMU in browsers) running a Linux kernel
Image downloadlazy: the chunks a container readsthe whole imagenpm packagesthe librarythe whole converted image
Network inpublishPort() (Node)yesto the page: a server's URL (server-ready)with a separate package (pglite-socket)with its c2w-net helper (-p)

#When to use which

  • Docker: when you can run it, for production and anything performance-sensitive. untainer is for where Docker is not: a browser tab, a test runner without Docker, a demo.
  • WebContainers: for Node.js applications in a browser IDE (commercial production use needs a license). untainer runs container images, any linux/arm64 one, Node.js among them, at the cost of an emulated user space, and needs no cross-origin isolation.
  • PGlite: for Postgres as a library in a JavaScript process, small (under 3 MB gzipped, as its documentation says) and fast to start. untainer runs the official Postgres image, with its extensions and tools (psql, pg_dump), as one container among others.
  • container2wasm: converts an image into one WebAssembly program, run whole. untainer keeps images as static chunks fetched as they are read. Measured below.

#Measured against container2wasm

Every configuration measured, on one Linux arm64 host (Docker on macOS, M4 Pro; not CI), from local files, three runs each (spikes/32-c2w/, 2026-12-05 and 2026-12-06; container2wasm v0.8.5, wasmtime 27.0.0, Chromium of Playwright 1.65.2). They differ in what runs the image: untainer runs its arm64 user space on a Linux kernel compiled to WebAssembly; each container2wasm target runs a machine emulator compiled to WebAssembly, with a kernel and the image inside it, all in one file.

ConfigurationWhat runs the imagenode:24-alpine: size; node -e "console.log(process.version)"postgres:17-alpine: size; ready (initdb, then the server)
untainer, Nodearm64 user space on unkernel; the CLI61.2 MB on disk, read as needed; 0.97-0.99 s125.1 MB, read as needed; 6.8-6.9 s
untainer, Chromiumthe same, the web entry, the VM in a workerthe same files; 1.26-1.38 sthe same files; 6.76-6.85 s
container2wasm, default (amd64)x86_64 user space on Bochs, an x86 emulator; wasmtimeone 278.6 MB .wasm; 12.1-12.3 sone 396.4 MB .wasm; does not start: initdb fails, its kernel has no System V shared memory
container2wasm, riscv64riscv64 user space on TinyEMU, a RISC-V emulator; wasmtimenot convertedone 326.3 MB .wasm; does not start: initdb fails, the same System V shared memory (it exits after 43.7-44.5 s)
container2wasm, aarch64arm64 user space on QEMU's user-mode emulation, inside TinyEMU; wasmtimeone 233.3 MB .wasm; 147.6-149.3 sone 340.3 MB .wasm; does not start: a Go program in it stops at once ("runtime: cannot allocate memory")
container2wasm, --to-jsx86_64 on QEMU's JIT to WebAssembly, resuming a state saved when it was made, the command built in; Chromium294 MB of files; the version in 1 run of 3, after 175.6 s; in the other 2, nothing on its terminal for 20 minnot measured: its conversion was stopped, as it held the machine for too long (node's took 1,165 s)

Making the images: untainer build takes 3.8 s for node:24-alpine with its layers cached and 22.2-25.5 s from an empty cache, most of it the download (on macOS, docs/findings.md, "The real build, measured"); container2wasm, through Docker, 1,046 s the first time for the default target, 8 s again with Docker's build cache. The details are in docs/findings.md, "Against container2wasm".

untainer  OCI images as containers in a browser tab or in Node.