C.W.K.
Stream
Lesson 01 of 05 · published

Bun — Why a New JavaScript Runtime

~11 min · bun, overview, javascript, anthropic

Level 0Newbie
0 XP0/55 lessons0/16 achievements
0/80 XP to next level80 XP to go0% complete

Bun is the youngest of the JavaScript package managers in this quest, and the most radical. It's not just a faster npm — it's a complete reimplementation of the JavaScript toolchain: runtime (replacing Node.js), package manager (replacing npm), bundler (replacing esbuild/webpack), test runner (replacing Jest/vitest), and even a small shell. All in one binary, all written in Zig on top of Apple's JavaScriptCore engine (the same one Safari uses) instead of Google's V8.

The speed numbers are real. On a Next.js project with ~1,100 packages and a cold cache: npm takes ~57 seconds, pnpm ~32 seconds, Bun ~8.6 seconds — about 7x faster than npm. Bun runs .ts and .tsx files directly without a compile step. Its built-in lockfile (bun.lock, formerly bun.lockb) uses a Structure-of-Arrays binary format parsed dramatically faster than text JSON.

Bun v1.3 (October 2025) added a full-stack dev server, built-in clients for MySQL/PostgreSQL/SQLite/Redis, a 100x reduction in idle CPU, isolated workspace installs, and bun audit. In November 2025, Anthropic acquired Bun. That's a meaningful detail in this quest — Bun is now developed by the same company whose API runs Pippa's brain.

Bun's compatibility story is good but not perfect. It implements Node.js APIs comprehensively, runs the vast majority of npm packages, uses the same registry, reads the same package.json. But native addons (some compiled C++ packages) and a handful of niche Node-specific APIs still don't work. For new projects, Bun is the most exciting bet; for legacy projects, test before you commit.

Code

Bun is many tools in one binary·text
  Runtime           Bun           (replaces Node.js)
  Package manager   bun install   (replaces npm/pnpm/yarn)
  Bundler           bun build     (replaces esbuild/webpack)
  Test runner       bun test      (replaces jest/vitest)
  Shell             bun shell     (replaces bash for scripting)
  Native TS         bun index.ts  (no tsc, no compile)
  Built-in DB       Bun.sqlite    (replaces better-sqlite3)

  All in one binary. Written in Zig. JavaScriptCore engine.

External links

Exercise

Read https://bun.sh/blog and skim the most recent three release posts. Notice how often the release notes say 'X% faster' or 'now built into Bun' — Bun's release cadence is genuinely fast. Pick one feature that surprises you and articulate why it matters for a project you actually work on.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.