Recreating a #javascript runtime f/ Scratch Understand the magic behind #nodejs core
summary
Recreates a minimal Node.js runtime by compiling V8 and libuv, wiring a V8 + libuv C++ bridge to expose functions like print and process.env, and implements timers by scheduling callbacks with setTimeout via libuv timers. Demonstrates that console.log and setTimeout are environment features not language features, shows promises as thin wrappers over callbacks, compiles a working binary with make, and compares approaches: Deno (Rust) and Bun uses JavaScriptCore + Zig, explaining performance differences hinge on C/C++/Rust implementation details.
AI-written summary · about
