Skip to content
Technology

Bun

Bun — Technology. category: JS/TS runtime + bundler + package manager + test runner; >22 M downloads/month; rewritten from Zig to Rust in May 2026 · usage: Build and packaging for Claude Code

Bun ships as a runtime, bundler, package manager and test runner for JavaScript and TypeScript, with more than 22 million downloads a month. Gergely Orosz's September 2025 account of how Claude Code is built places Bun in the build and packaging step, alongside TypeScript, React with Ink and Yoga: a stack chosen because the Claude model already writes it fluently.

Anthropic acquired Bun in December 2025. Jarred Sumner, its creator, then rewrote it from Zig to Rust between 3 and 14 May 2026, eleven days against 535,496 lines. The motivation was a recurring bug class (use-after-free, double-free, leaks) born of mixing garbage-collected memory from JavaScriptCore with Zig's manual allocation. In safe Rust those become compilation errors with automatic cleanup.

Sumner ran the port through roughly 50 dynamic workflows in Claude Code, four worktrees times sixteen agents, with a second Claude in a separate context seeing only the diff and told to find why the code is wrong. The existing suite carried the verdict: 60,624 tests written in TypeScript, therefore independent of the implementation language, 1.39 million assertions, no test deleted. The run produced 6,502 commits, a diff of +1,009,272 lines, about 16,000 compilation errors handled as a queue, and 5.9 billion uncached input tokens plus 690 million output, roughly $165,000.

The shipped result is narrow by comparison: Claude Code v2.1.181 starts about 10% faster on Linux. Four percent of the new code remains unsafe, and 19 regressions have been fixed since the merge.

Type
Technology
category
JS/TS runtime + bundler + package manager + test runner; >22 M downloads/month; rewritten from Zig to Rust in May 2026
usage
Build and packaging for Claude Code
relations
6
Cited in
2 fiches

Neighborhood

← created

Jarred Sumner PERSONNE high confidence stable Source ↗

→ uses

Rust TECHNOLOGIE high confidence stable Source ↗
JavaScriptCore TECHNOLOGIE high confidence timeless Source ↗

← uses

Claude Code TECHNOLOGIE high confidence evolving Source ↗

→ is part of

Anthropic ORGANISATION high confidence stable Source ↗

Cited in (2)