AGENTIC COMMONSAI industry briefings

繁中EN

TopicAI Coding & Developer ToolsPublished

All English articles

Bun 1.4 Is Rust Now: 64 Claude Agents Ported It in 11 Days

On this page6 sections
  1. The Case for Dropping Zig
  2. What 64 Agents Pulled Off in Eleven Days
  3. How Testing and Adversarial Review Kept Quality Up
  4. Benchmarks, Memory, and Where It Already Runs
  5. What This Teaches Engineering Teams in the Agent Era
  6. Sources

Summary: Bun 1.4.0 shipped on July 8, 2026 as the runtime’s first Rust release after 535,496 lines of Zig were ported by up to 64 Claude agents in eleven days. The migration was checked by 1.39 million assertions, adversarial reviewers seeing only diffs, later security reviews, and fuzzing; 19 port regressions were fixed. Reported results include higher server throughput, lower memory across repeated builds, and about 20 percent smaller binaries.

Bun shipped v1.4.0 on July 8, 2026 — the first release of the JavaScript and TypeScript runtime built in Rust, with v1.3.14 standing as the last Zig-based version. Anthropic bought Bun in December 2025, and rather than another round of incremental polish, founder Jarred Sumner moved the whole runtime over to Rust. The unusual part is who did the work: barely any of it was ported by hand. Claude Code’s dynamic workflows, working alongside a pre-release Claude Fable 5, handled the migration with up to 64 agents on the clock at once, and finished in eleven days. Sumner supervised the run from start to finish — the typing, though, was done almost entirely by the agents.

The Case for Dropping Zig

The reason was concrete. v1.3.14 went out the door carrying a string of memory-management defects: use-after-free, double-free, and leaks spread across node:zlib, node:http2, UDPSocket, Buffer, crypto.scrypt, fs.watch, the CSS parser, and MessageEvent. Sumner put the root cause down to two memory regimes coexisting — garbage-collected JavaScriptCore values alongside manually managed memory. Zig requires cleanup to be written by hand at every call site, and a single missed spot means a leak or a double free. Set comments aside and the codebase came to 535,496 lines of Zig. C++ was on his list too, but that only hands the gatekeeping back to human reviewers. He squeezed the whole argument into one line: “Compiler errors are a better feedback loop than a style guide.” In safe Rust, each of these bug classes turns into a compile failure, and resource release takes care of itself. He still gives Zig its due: “Zig made Bun possible. I would never have been able to build this much in 1 year if it wasn’t for Zig.”

What 64 Agents Pulled Off in Eleven Days

The timeline is a stress test in its own right. Work kicked off May 3 and the branch merged May 14 — eleven days end to end, spanning roughly 50 workflow loops. At peak, 64 Claudes were on the job simultaneously, arranged as 4 workflows of 16 agents each and spread over 4 git worktrees. 1,448 .zig files became .rs files, and around 16,000 compiler errors were carved up and handed to individual agents. Output peaked near 1,300 lines per minute; the busiest single hour produced 695 commits, out of 6,502 in total, and the final diff ran past a million lines. Two documents kept the order: a porting guide laying down the mechanical rules, and a lookup table tracking the lifetime of every struct field. Sumner doubted the approach at the start; only after several days, with a high percentage of tests passing, did he merge the branch in its entirety.

How Testing and Adversarial Review Kept Quality Up

Three layers held quality in place. The first was testing: no test was skipped or removed, and the roughly 1.39 million assertions across 4,174 test files all ran on Debian. Written in TypeScript, the suite doubles as a conformance harness that is indifferent to the implementation language — exactly what let the agents check their own work over and over. The second was adversarial review: one agent writes the code while at least two others attack it from separate context windows in which nothing but the diff is visible, and reviewers were explicitly told to refuse long self-justifying comments — “if a workaround needs a paragraph, the code is wrong — fix the code.” The third was cleanup after the fact: all 19 regressions introduced by the port were fixed, about 4% of the Rust lives in unsafe blocks, and the follow-up brought 11 rounds of security review plus fuzzing that pushed the parsers through on the order of a hundred billion executions.

Benchmarks, Memory, and Where It Already Runs

Nothing here matches the old “the rewrite got slower” ending — almost every metric ticked up:

  • Bun.serve rose from 169.6k to 177.7k requests per second (+4.8%)
  • next build dropped from 13.62s to 13.03s (+4.5%), and tsc got 4.7% quicker
  • Across 2,000 in-process builds, memory went from 6,745 MB down to 609 MB — v1.3.14 was losing about 3 MB per build
  • The binaries came out roughly 20% smaller: 94 to 76 MB on Windows, 88 to 70 MB on Linux
  • Another 128 bugs that reproduce in v1.3.14 were fixed in passing

The invoice is just as specific: 5.9 billion uncached input tokens, 690 million output tokens, and 72 billion cached reads — roughly $165,000 at list API prices, which Sumner sizes up as three engineers working for a year. It is already serving production, quietly: Prisma’s compute service public beta runs on it, and Claude Code switched at v2.1.181, picking up 10% faster Linux startup and, per Sumner, “barely anyone noticed.” His summary: “Boring is good.”

What This Teaches Engineering Teams in the Agent Era

Simon Willison’s commentary slots the episode into a longer history: the edict Joel Spolsky laid down in 2000 — “never rewrite from scratch” — has now met its first credible exception, delivered by frontier coding agents backed by a million-assertion conformance suite. Engineering teams can take three things away. Put the constraints into the compiler and the test suite instead of a style guide. Keep reviewers in isolated contexts where the diff is all they see, so the implementer’s narrative never does the persuading. And once a port collapses from person-years to eleven days plus a single API invoice, the variables inside any language or platform migration decision are no longer the old ones. As Sumner puts it: “One engineer can do a lot more today than a year ago.”

Sources

AGENTIC COMMONSOperated by PHLEGON LABS
ShareXEmail
Support us

Related reading

  1. Function Hooks That Live Inside Claude Code: Building Your First Mod

    Claude Code mods moved past the feature flag to on-by-default TypeScript hooks that can rewrite events and redraw the interface.

    Claude Code

  2. DeepSeek Open-Sources Agent Harness in Developer Preview

    DeepSeek's agent harness enters an MIT-licensed developer preview: a Cordis plugin kernel, a replayable append-only session log, and four runtime modes, open from day one.

    Agent Harness

  3. Block Open-Sources Buzz: Chat, AI Agents, Git in One Place

    Block open-sourced Buzz on July 21, 2026: team chat, AI agents as workspace members, and Git hosting on one signed-event stream, to cut reliance on Slack and GitHub.

    AI Agents