Bun, the fast JavaScript runtime famous for being written in Zig, is experimenting with rewriting itself in Rust. The change surfaced through a massive GitHub pull request touching about 2,188 files and nearly one million rewritten lines, making it one of the largest AI-assisted code conversions ever made public. The twist that makes this more than a language flame war: Bun has been part of Anthropic since December 2025, and it ships as the executable behind Claude Code, Anthropic's coding assistant used by millions.
- Scale. Roughly 2,188 modified files and close to a million rewritten lines, with only a few thousand removed, converting Bun's Zig core toward Rust.
- Not committed. Bun's Jarred Sumner says there is a very high chance the code gets thrown out completely; it is an experiment, not a decision.
- Why Rust. A large, mature ecosystem and an easier hiring pool, versus a forked Zig the team cannot upstream because of Zig's strict no-AI-contribution policy.
- Early result. The Rust branch already reports 99.8% test compatibility on Linux x64 glibc.
What is actually happening in the pull request?
An enormous, AI-assisted port of Bun's core from Zig to Rust, visible as a single giant PR. It touches roughly 2,188 files and rewrites close to a million lines while deleting only a few thousand, which tells you this is a mechanical-plus-manual conversion rather than a cleanup. The Rust branch already claims 99.8% test compatibility on Linux x64 glibc, so it is not a toy sketch. But the framing matters: this is an exploration to see what a working version looks and feels like, how it performs, and whether it is worth pursuing at all.
RelatedTypeScript 7 Go Compiler Hits RC and Runs 10x Faster
Why would Bun leave the language that made it famous?
Two structural reasons, neither of them about raw speed. First, ecosystem and hiring: Zig is a young language with a small community, and finding engineers who know it deeply is hard, while Rust has become the default for systems-level rewrites across the industry with a huge talent pool. Second, and more specific, Bun had forked Zig to get roughly 4x faster debug builds via parallel LLVM codegen, but those improvements cannot be upstreamed because Zig maintains a strict no-AI policy for issues, pull requests, and bug-tracker comments. For a company owned by Anthropic and building AI coding tools, maintaining a private fork of a language that structurally rejects AI contributions is an awkward long-term position.
Does this change anything for developers today?
Not yet, and possibly never. Sumner was blunt on Hacker News that the team has not committed to the rewrite and that there is a very high chance the code gets thrown out completely. Bun 1.3 continues to ship on the Zig codebase, with zero-config frontend serving via bun index.html, a native MySQL client alongside SQLite and Postgres, and a built-in Redis client. If you use Bun in production, nothing about your setup depends on the outcome of this experiment. What it does signal is that even the runtime famous for Zig now sees Rust as the safer bet for a large, AI-collaborative team, which is a data point about where systems programming is drifting.
- Performance parity. Zig was Bun's speed story. Watch whether the Rust branch matches it before any commitment.
- The decision. Sumner says it may all be discarded. Watch for a formal go or no-go.
- Claude Code impact. Bun ships inside Claude Code. Watch whether a rewrite touches distribution or startup time.
- Zig's response. Losing a flagship user is a moment. Watch whether Zig revisits its AI-contribution stance.
What does this say about Zig's future?
Losing a flagship user stings, but Zig's position is more nuanced than a headline suggests. Bun made Zig visible to a generation of developers, and the language's speed and simplicity are exactly what drew Bun in the first place. The friction was never performance; it was ecosystem size and Zig's firm refusal to accept AI-assisted contributions, a principled stance that collides directly with how an Anthropic-owned team now works. Zig can keep that policy and stay a compelling choice for developers who want a small, fast, human-authored language, or it can revisit it. Either way, the episode is less a verdict on Zig than a snapshot of how AI-heavy engineering cultures now weigh a language's community and contribution rules alongside its raw technical merits.
RelatedPostgreSQL 19 Beta Makes Async I/O Actually Scale
Our take
Read this as an experiment, not a migration, because that is exactly how Bun's own maintainer describes it. A million rewritten lines at 99.8% test compatibility is impressive proof that AI-assisted porting at this scale is now feasible, and that alone is the real headline here. But the interesting tension is organizational, not technical: Bun's Zig fork became unmaintainable specifically because Zig refuses AI-assisted contributions, and Bun is now an AI company's tool. The pragmatic case for Rust, ecosystem depth and a hiring pool, is strong enough that even a discarded trial pushes the odds toward an eventual move. Nothing changes for your production Bun today. But if you were choosing a systems language for a team that leans on AI tooling, this episode is a quiet argument for the boring, well-populated option.
- OfficialBun on GitHub , source, PRs, and releases
- ReferenceThe Register , scope of the Zig-to-Rust trial
- Referencebun.sh blog , Bun 1.3 feature notes
Original analysis by GenZTech. Figures current as of July 2026. Source: github.com/oven-sh/bun
