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

  1. bun-runtime โ€” Bun as the primary runtime
    • bun install, bun run, bun test, bun build
    • Bun.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

  1. 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

  1. 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?

๐Ÿ“ Change Log

2026-08-29

Choose Theme

Your selection is saved locally.

Neural Cacophony
Aperture v2
Flux v1
Mosaic Chaos
Nexus v1
Nexus Zest
Prism v2
Synapse