x86 operating systems running inside Cloudflare Durable Objects
Full x86 PCs emulated at the edge using Stratum (a v86 fork with AHCI, ACPI, and SMP extensions). The browser connects over WebSocket and receives compressed framebuffer updates — no plugins, no VNC client, just a <canvas>.
🚀 Try it live: do86.ashishkumarsingh.com
┌────────────┐ ┌────────────┐ ┌─────────────────────┐
│ │ WebSocket │ │ RPC │ │
│ Browser │◄────────────►│ Worker │◄────────────►│ Durable Object │
│ │ │ │ │ │
│ canvas │ frames+input │ routes │ assets │ Stratum (v86) │
│ keyboard │ │ packs │ │ demand-paged RAM │
│ mouse │ │ assets │ │ delta encoder │
│ │ │ │ │ SQLite storage │
└────────────┘ └────────────┘ └─────────────────────┘
- Browser opens a WebSocket to the Worker, requesting an OS image
- Worker loads BIOS + disk image from Assets/CDN, packs them, and forwards to the Durable Object
- Durable Object boots Stratum — a full x86 CPU emulated in WebAssembly with demand-paged guest RAM
- Frames are captured from virtual VGA, delta-compressed (tile-based diffing), and streamed over WebSocket
- Input (keyboard scancodes, mouse deltas) flows back to the emulator
| Image | OS | Boot | Notes |
|---|---|---|---|
kolibri |
KolibriOS | Floppy | Default. Full GUI, boots in seconds |
aqeous |
AqeousOS | Multiboot | Custom x86 OS with AHCI, window system, EXT2 |
tinycore |
TinyCore 15 | CD-ROM | Minimal Linux with X11 + FLWM |
tinycore11 |
TinyCore 11 | CD-ROM | Classic release |
dsl |
Damn Small Linux | CD-ROM | Fluxbox desktop, browser, tools |
helenos |
HelenOS | CD-ROM | Research microkernel OS |
linux4 |
Linux 4.x | CD-ROM | Minimal text-mode kernel |
Guest OSes see up to 3.5 GB of logical RAM, but the DO only commits ~60-80 MB of real memory (within the 128 MB DO limit):
Guest Physical Address Space (up to 3.5 GB logical)
┌──────────────────────┬──────────────────────┬─────────────────────┐
│ Resident Zone │ Hot Page Pool │ Cold Pages │
│ 0 – 32 MB │ 32 – 64 MB WASM │ > 64 MB │
│ Always in WASM │ 8192 × 4KB frames │ Stored in SQLite │
│ BIOS, kernel, low │ Clock eviction │ Paged in on fault │
└──────────────────────┴──────────────────────┴─────────────────────┘
- WASM-side pool lookup: TLB miss →
pool_lookup(gpa)— pure WASM, zero FFI - Cold miss:
swap_page_in()→ SQLite read → frame allocation - Batched SQLite I/O for page fault storms
- CDN-cached disk images via Cache API
- Adaptive FPS: 2–30 FPS based on screen activity
- Tile-based delta compression: only changed tiles sent
- Multi-client: multiple browsers share the same VM session
Hot x86 basic blocks compiled to WASM at runtime via WebAssembly.instantiate(). Confirmed working in production Workers (200+ compiled blocks).
bun install
bun run devbun run build
npx wrangler deployThis project uses Stratum, a fork of v86 with AHCI, ACPI, SMP scaffolding, demand paging hooks, and net_device: "none" support.
Rebuild after stratum changes:
cd ../stratum && bun run build
cp build/libv86.mjs ../do86/src/libv86.mjsMIT