Runtime โ JavaScript & TypeScript Runtimes
Status: Active Last Updated: 2026-08-29 Category: Runtimes & Execution Environments Prerequisites: kb/languages/ โ TypeScript basics Tags: bun, node, deno, runtime, javascript, typescript, server
Summary
How JavaScript and TypeScript execute โ the runtimes, the event loop, module systems, and how to deploy and run code outside the browser. This stack uses Bun as the primary runtime (fast, all-in-one, native TypeScript support).
๐ฏ Learning Philosophy
Why Runtimes Matter:
Browser: V8 engine (Chrome/Edge) โ DOM APIs
Node: V8 engine โ server-side APIs (fs, net, http)
Bun: JavaScriptCore engine โ all-in-one (install + test + build + serve)
Deno: V8 engine โ secure-by-default, built-in TypeScript
๐ Learning Path
Prerequisites: kb/languages/typescript-basics
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 1: Bun Fundamentals โ
โ โโ What is Bun โ
โ โโ Bun install, run, test, build โ
โ โโ Bun.serve() and native HTTP โ
โ โโ Bun vs Node vs Deno โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 2: Node.js Fundamentals โ
โ โโ Node architecture (V8 + libuv) โ
โ โโ CJS vs ESM module systems โ
โ โโ npm / pnpm / yarn โ
โ โโ Event loop and async patterns โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 3: Runtime Internals โ
โ โโ The event loop โ
โ โโ Worker threads and WASM โ
โ โโ Hot startup, JIT compilation โ
โ โโ When to use Bun vs Node โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Articles in This Directory
๐ข Phase 1: Bun
- bun-runtime โ Bun as the primary runtime
bun install,bun run,bun test,bun buildBun.serve()for HTTP servers- Bun SQLite, Bun.file(), Bun.$() shell
- Bun vs Node vs Deno comparison
- Prerequisites: TypeScript basics
- Time: 2-3 hours
๐ก Phase 2: Node.js
- nodejs-runtime โ Node.js deep dive
- V8 + libuv architecture
- CJS (require) vs ESM (import)
- npm, pnpm, yarn package managers compared
- Event loop phases and microtasks
- Prerequisites: TypeScript or JavaScript basics
- Time: 3-4 hours
๐ Phase 3: Runtime Internals
- runtime-internals โ How runtimes work
- Event loop: call stack, task queue, microtask queue
- Worker threads, cluster module
- WASM integration
- JIT compilation basics
- When to choose Bun vs Node vs Deno
- Prerequisites: Node or Bun experience
- Time: 3-4 hours
๐ What Comes Next?
- kb/backend/ โ Building HTTP servers and APIs with these runtimes
- kb/containers/ โ Packaging runtimes in containers
- kb/infrastructure/ โ Deploying runtimes to production
๐ Change Log
2026-08-29
- Created runtime/ directory scaffold
- Defined 3-phase learning path
- Bun is primary runtime for this stack