Jarred Sumner (@jarredsumner) has put Bun through the kind of rewrite most infrastructure founders avoid: moving the JavaScript toolkit from Zig to Rust after Bun had already become production software with over 22 million monthly CLI downloads.
In a July 8th blog post, Sumner said Bun is being rewritten in Rust, with a pre-release version of Anthropic's Claude Fable 5 used for much of the port. The post also disclosed a key piece of corporate context around the work: Bun was acquired by Anthropic in December 2025, and Sumner and others on the Bun team now work at Anthropic.
The timing matters because Bun's original identity was inseparable from Zig. Sumner wrote that Bun began as a line-for-line port of esbuild's JavaScript and TypeScript transpiler from Go to Zig, and that he wrote his first line of Zig on April 16th, 2021. The GitHub issue he linked, opened on April 19th, 2021, says he was on about day three of writing Zig, which lines up with that origin story. Sumner's telling is direct: the initial version of Bun was written by him in one year, in an Oakland apartment, before the current wave of coding models.
That is the founder story under the compiler debate. Bun became one of the most visible real-world arguments for Zig as a language for ambitious developer infrastructure. Sumner still credits Zig with making the first version possible. His argument for Rust is narrower and more practical: Bun's workload now mixes a garbage-collected JavaScript engine, native code, Node.js compatibility, and a growing list of APIs where memory lifetime mistakes create production crashes.
The July 8th post fills in the backstory: why Sumner decided a rewrite was worth the risk, how he used Claude to compress the work, and what kinds of bugs pushed Bun there.
The bug list made the language question concrete
Bun is broad by design. It is a runtime, package manager, test runner, bundler, transpiler, minifier, module resolver, HTTP and WebSocket client, and partial Node.js API implementation. Bun's homepage positions it as a fast, incrementally adoptable JavaScript, TypeScript, and JSX toolkit, with separate components such as bun install
, bun test
, and bun build
, plus runtime features that aim at Node.js compatibility.
That scope gave Bun distribution. Sumner says Bun's CLI gets more than 22 million monthly downloads. He also says Claude Code and OpenCode use Bun as their runtime, while Vercel, Railway, DigitalOcean, and others have first-party support for it. Bun's own homepage names Claude Code, Railway Functions, and Midjourney as users or adopters of specific Bun capabilities.
The same scope gave Bun a stability problem. Sumner's post lists recent Bun v1.3.14 fixes that read like a map of lifetime hazards: use-after-free crashes in node:zlib
, node:http2
, and UDP socket paths; out-of-bounds reads in Buffer#copy
and Buffer#fill
; an out-of-bounds write in UDPSocket.sendMany()
; leaks in crypto.scrypt
, `tlsSocket.setSession()`
, `fs.watch()`
, and DuplexUpgradeContext
; a CSS parser double-free; and a race in MessageEvent
.
Sumner does not present that as a general indictment of Zig. He writes that other Zig users do not have Bun's bugs and that mixing garbage collection with manually managed memory is an unusual workload. His specific claim is that Bun's error surface had outgrown an approach dependent on manual cleanup, review discipline, and repeated one-off fixes.
Bun had already invested in defensive engineering. Sumner says the team patched the Zig compiler to add Address Sanitizer support, ran the test suite with ASAN on every commit, shipped Zig safety-checked ReleaseSafe builds on Windows, fuzzed runtime APIs around the clock with Fuzzilli, and maintained end-to-end memory leak tests.
The decision to move to Rust is Sumner admitting those guardrails were downstream of the bug. Fuzzing and CI find problems after code exists. Rust's ownership model, Drop
, and compiler checks move some of those mistakes into the edit-compile loop. For a runtime that wants more Node.js compatibility and more built-in native APIs, that earlier feedback loop is the product bet.
Claude changed the rewrite math
Sumner's post is also an Anthropic case study, even if it is written as a Bun engineering post. He says a rewrite in another language would normally require a small team of engineers for a full year, and Bun's Zig codebase excluding comments was 535,496 lines. That is the kind of rewrite founders usually postpone until the current architecture forces a customer-visible failure.
Instead, Sumner says he spent a week testing whether Anthropic's new model could rewrite Bun in Rust, then pushed into an 11-day production workflow.
The mechanics were more structured than a single prompt. Sumner says he used about 50 dynamic workflows in Claude Code over 11 days. Those workflows generated a porting guide, translated .zig
files to .rs
files, fixed compiler errors, got subcommands such as bun test
and bun build
working, pushed the full test suite toward passing, and handled cleanup passes.
The numbers are unusual even by AI coding standards. Sumner says the rewrite involved 1,448 Zig files, 6,502 commits over 11 days, and peak output of about 1,300 lines of code per minute. He says every line was reviewed by two separate Claude reviewers before commit, with a separate Claude context used for adversarial review. The workflow split work across four worktrees, with 16 Claude loops per worktree during one phase.
The interesting claim is not that Claude produced a giant diff. Large diffs are easy to generate. Sumner's more important claim is process design: one agent implements, two or more agents review in separate contexts, and failures are fixed by adjusting the loop rather than hand-editing every mistake. That is a founder turning AI coding from a chat interface into a managed production line.
The Anthropic acquisition reframes the incentives
The December 2025 Anthropic acquisition is not new July news, but it changes how to read the Rust rewrite. Bun is no longer an independent developer-tools startup optimizing only for adoption and community mindshare. Bun is now inside one of the major AI labs, and Sumner's post is a live demonstration of Anthropic's coding tools against a hard target: a production runtime with hundreds of thousands of lines of systems code, a language-independent test suite, native libraries, and real users.
The acquisition terms are not disclosed in the materials reviewed. The post does not give Bun's headcount before the deal, the purchase price, or investor outcomes. What it does show is the strategic fit Anthropic bought: Bun is developer infrastructure with distribution among the same users Anthropic wants for Claude Code, and Bun's own codebase became a proving ground for AI-assisted software maintenance.
That incentive cuts both ways. Anthropic benefits if Bun's Rust rewrite becomes evidence that Claude can handle large, tedious, correctness-sensitive engineering work. Bun benefits if Anthropic's models let Sumner move faster without freezing product work for a year. Developers will judge the result by release quality, not by the size of the generated patch.
Bun's position in the JavaScript toolchain raises the stakes. Bun competes across categories that usually have separate incumbents: Node.js for runtime, npm and adjacent package managers for installs, Jest and Vitest for tests, Vite and esbuild for builds. The more Bun replaces, the less tolerance production teams have for crashes in compatibility layers and native APIs.
That is why the Rust rewrite matters beyond language tribalism. Bun's pitch has always combined speed with consolidation. Speed wins trials. Consolidation wins teams that want fewer moving parts. Stability decides whether those teams put Bun under revenue-generating workloads.
Sumner is making a founder's trade: preserve Bun's aggressive scope while changing the engineering substrate that carries it. Zig made the one-year build possible. Rust is being asked to make the next several years boring enough for infrastructure buyers.
The open question is performance under real production load
The July 8th post gives Bun a detailed rationale and an unusually transparent account of the porting process. It does not prove the rewrite will eliminate the classes of bugs Sumner is targeting, and it does not establish a completion date for every Rust-era refactor. Sumner says the initial Rust code was meant to look close to a mechanical translation of the Zig code, with idiomatic Rust cleanup and reductions in unsafe
usage to come after Bun v1.4 ships.
That is the right sequencing for a project with active users: change as little behavior as possible during the port, then refactor once the test suite and benchmarks say the new code matches the old system. It also means the full payoff depends on the less glamorous work after the headline rewrite. A Rust codebase with heavy unsafe
can still carry lifetime risk if the team does not keep paying down the translation layer.
For Sumner, the rewrite is also a public admission that founder taste can evolve without repudiating the original bet. He chose Zig when it let one person ship a sprawling JavaScript toolkit in a year. He chose Rust when the problem changed from building the first version to reducing entire categories of leaks, double-frees, and use-after-free crashes in a tool millions of developers install every month. The story to watch is whether Bun can keep its speed promise while making reliability less dependent on Sumner personally spotting every dangerous lifetime edge. That was always the hard part of turning a founder-built tool into infrastructure. Claude may have made the rewrite feasible. Rust now has to make the maintenance curve saner.