An ephemeral, in-memory virtual runner: boot a repo into a RAM-backed filesystem and run its real toolchain (pnpm/npm, native addons, scripts) isolated at native-parity speed. The speed story is honest: a cold command costs about what it costs natively (the RAM overlay buys isolation, not per-command wins — the page cache already serves warm reads from RAM) — the wins come from skipping work: install once and fork the warm snapshot, replay unchanged runs from the task cache near-instantly.
virrun -- pnpm install
virrun -- pnpm test
The virrun -- <cmd> prefix sandboxes any command; the child's exit code is propagated and output streams live. On a capable host the os backend runs it in a bubblewrap RAM overlay, otherwise it falls back to native. The CLI (built on unjs/citty) also has run/exec/snapshot/init/cache subcommands — run virrun --help. Prerequisites, the subcommand reference, the programmatic API, and the package scripts are in the Getting Started guide.
| Backend | Isolation | Selected by Auto |
Notes |
|---|---|---|---|
native |
none | ✓ (today) | Runs the command directly on the host. |
vfs |
none (in-process, no spawn) | — | Recognised pure-JS node invocations in-process; falls back to native. |
os |
bubblewrap RAM-overlay + namespaces | — | Linux or Windows/WSL2 + bwrap. Never falls back — an un-isolated run would be wrong. |
auto |
resolves to the best gate-proven | — | Resolves to native until an isolating backend beats the gates. |
What's landed and dogfooded in this repo (the roadmap tracks open work; both gates — differential correctness + speed — run from the first backend onward):
vfs backend — recognised pure-JS node invocations run in-process, no spawn; falls back to native otherwise.os backend — bubblewrap RAM-overlay exec with a shared CAS dep store and the WSL2 bridge (macOS bridge is the one open piece).--no-cache. The capability probe is likewise cached across processes so each virrun -- <cmd> skips re-probing.virrun -- <cmd> flushes produced files to the host so disk matches native; the ephemeral fork stays for CI/verification. → write-back.mdwsl.exe invocation, skipped entirely on a clean tree. This removed the per-run whole-tree rsync stat-walk over 9p (~12.5s on this repo with zero changes) that was the win32 floor. → wsl-source-mirror.mdrun / exec / warm / init / cache subcommands with --help, the bare virrun -- <cmd> prefix preserved as the default.virrun.config.{ts,mts,js,mjs,json} picks the backend (loaded via unconfig); the TS form (defineConfig from virrun/config) is where process.platform branching lives. The prefix stays the sole on/off switch (no allowlist).format, lint/lint:fix, test, typecheck, and the producing build:app / build:docs route through the prefix. The platform-branched config resolves the WSL os backend on win32 and native on Linux (so the CI runners are plain native execs); build:packages (bootstrap) and coverage (correctness gate) stay native by design — see ci.md.We highly recommend you take a look at the documentation to level up.
*.bench.md, CodSpeed.Design docs live in packages/app/content/docs/virrun — start with the architecture overview and the execution backends page.
This project is licensed under the Apache-2.0 license.