02 — Evolving Beyond Legacy `lo`: Composable V8 Snapshots, CDP, and Self-Maintaining CI
02 — Evolving Beyond Legacy lo: Composable V8 Snapshots, CDP, and Self-Maintaining CI
2026-11-19 · Awesome-OS Development History
Every ambitious operating system carries fossils from its earliest prototypes. For Awesome-OS, our V8 integration originally grew out of lo — a fast, direct C++ V8 embedder that proved JS/TS could run close to the metal, but still tied V8 to monolithic C++ glue and 100,000-line v8.h template headers.
Today, V8 is no longer a special-case monolith in Awesome-OS. It is just another clean, composable Section.
1. B8gAbiV8Section: Normal C Components + Real Multithreading & Forking
In sections/b8g-abi-v8/, we replaced legacy embedder coupling with a tiny zero-v8.h C header (b8g_abi_v8_section.h) extending b8g_abi.h v2:
- Zero-
v8.hC Component Linking: Any standard C, C++, Zig, or Rust component links directly to V8 viab8g_v8_section_link_component()without parsing a single V8 C++ template header. - Real V8 Multithreading: OS worker threads spin up isolated
v8::Isolateinstances (spawnWorkerIsolate) sharing zero-copyB8G_ARENA_V1SharedArrayBuffermemory (b8g_v8_section_get_shared_arena) — nopostMessageserialization overhead. - Millisecond Isolate Forking:
forkIsolate()combines V8SnapshotCreatorblobs with Copy-On-Write arena marks so child isolates boot pre-warmed in milliseconds.
2. CDP + Self-Advancing Snapshot REPL (b8g-abi-v8-cdp-repl)
We also integrated two capabilities directly alongside B8gAbiV8Section in cdp-repl.mts:
V8CdpSection: Lightweight, zero-Puppeteer V8 Inspector / CDP dispatch (Runtime.evaluate,HeapProfiler.takeHeapSnapshot) against the live isolate.V8SnapshotReplSection: A self-advancing REPL (repl-projection.host.mts) where you evaluate code live, freeze content-addressed snapshot layers (base -> math-layer -> custom-dsl) into.b8g-cas/v8-snapshots/, and callcomposeCustomBinary()to project any chain of legacy + incremental snapshots into a standalone custom binary!
Instead of writing fragile bundler pipelines for every custom runtime, you simply compose snapshots — the same way OCI composes filesystem layers, except at the V8 heap level.
3. Unified Distributed Builds & Self-Maintaining V8 CI
With C++ (b8g-cxx), Rust (b8g-rust), and Zig (b8g-zig) all aligned onto the exact same .b8p CAS pack format and UniversalBuildIntersection, even a full V8 or Chromium build (C++ + Rust + generated code) reduces to one distributed wave step.
To keep the repository clean and self-maintaining as we scale, we locked down a 4-Phase Refactoring & Autonomous V8 CI Plan (docs/REPO-REFACTORING-AND-V8-CI-PLAN.md):
- Quarantine legacy browser/Puppeteer leftovers and unify
.b8p/.b8ewire headers +b8g-shellnaming. - Enforce 4 canonical workspace zones:
sections/(pure portable schemas),intersections/(compositions +dev-catalog),packages/@awesome-os/(host-edge engines & shims),repository/(platform products). - Autonomous
V8AutoUpdateSection: Polls upstream V8 tags, predicts.b8pCAS reuse in ~2 seconds (b8g-reuse-report), verifies C-ABI stability viav8.api.digest, compiles only cache misses, rebuilds the base V8 snapshot, and publishes signed.b8ppacks viaB8G Stream Runner. - One Root
maintenance.mtsMatrix: Runs every core Awesome-OS test and validatable benchmark (deno,rust,bun,b8g-abi-v8) in one fast sweep.
This is the architecture of an OS that builds, inspects, previews, and upgrades itself.