Million-line Bun runtime ported from Zig to Rust by Claude agents in 10 days
Anthropic's Claude agents rewrote the million-line Bun JavaScript runtime from Zig to Rust in ten days, with the new codebase passing 99.8% of tests and headed for mainline.

Bun, the JavaScript and TypeScript runtime owned by Anthropic since late 2024, has been rewritten from Zig to Rust in ten days by Claude agents. The million-line port is now in a pull request headed for the main branch, with the Rust codebase already passing 99.8% of existing tests.
Creator Jarred Sumner announced the experimental rewrite on May 5, noting it was early-stage research. Ten days later, the full port landed in canary builds. The speed marks a visible step-change in what agent-driven coding can ship at scale — a million lines of systems-level code in a production runtime, not a toy demo.
What stands out
- 01Timeline compression. A full-language port of a performance-critical runtime typically spans months of engineer-time. Claude agents closed the loop in ten days, including test coverage that already hits 99.8% pass rate.
- 02Production stakes. Bun is a real-world tool with users, not a research artifact. Anthropic is betting the Rust rewrite will ship to stable soon, which means the agent output is considered merge-ready by the maintainers.
- 03Zig to Rust is non-trivial. The two languages have different memory models, concurrency primitives, and FFI conventions. Porting a runtime that interfaces with V8 and native modules is not a search-and-replace task.
- 04Canary availability now. Developers can test the Rust branch in Bun's canary channel today. The 99.8% test pass rate suggests the stable release is weeks away, not quarters.
- 05Anthropic's vertical integration. Owning both the model (Claude, likely the Mythos variant) and the runtime being rewritten gives Anthropic a closed feedback loop for agent capability. The Bun port doubles as a live benchmark.