Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch
summary
Recreates a minimal JavaScript runtime by linking V8 + libuv + C++, reading JS as a string, compiling into V8 objects, and exporting C++ functions (printf/console) into the global context. Implements timers by wrapping libuv timers and converting JS callbacks to C++ callbacks via V8 APIs, compiles with a Makefile into a binary that runs real code and async events — it works after iterative fixes. Compares approaches: Deno uses Rust+V8+Tokio, Bun uses Zig/JavaScriptCore, and small language/runtime choices and OS buffer handling explain performance and DX differences.
AI-written summary · about
chapters (4)
- 0:00Introduction and motivation
- 3:34Recreating Node.js from scratch
- 16:00Comparing JavaScript runtimes
- 20:55Conclusion and resources








