Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch
summary
Recreates a JavaScript runtime called capybara runtime using V8 + libuv and C++: compiles V8 (multi‑GB source, hours) into an ~8GB monolithic binary, wires C++ bindings to expose a print function, implements working setTimeout/setInterval via libuv timers, shows promises are just abstractions, and demonstrates Node’s worker‑pool threads for blocking tasks. The runtime runs end‑to‑end after weeks of work and debugging, matching how Node, Deno and Bun map JS to OS services.
AI-written summary · about
chapters (10)
- 0:00Recreating JS runtimes
- 4:19Project background
- 16:26Node.js execution model
- 22:27Node.js internals
- 26:04Runtime dependencies
- 33:03JS APIs in C++
- 35:15setTimeout/setInterval
- 40:11Many JS runtimes
- 45:52JS runtimes future
- 47:38Resources & closing








