Bun developer Jarred Sumner announced on May 9, 2026 that an experimental AI-assisted port of the JavaScript runtime from Zig to Rust has reached 99.8% test compatibility on Linux x64 glibc. The migration, assisted by Claude, represents one of the largest AI-driven code rewrites attempted to date, with 760,000 lines of code translated across 1,799 files in 43 commits.
AI-Assisted Migration Translates 760,000 Lines of Code
The experimental port lives in a GitHub branch named 'claude/phase-a-port' and uses Claude to help translate Bun's codebase from Zig to Rust. Sumner emphasized on Hacker News that "We haven't committed to rewriting. There's a very high chance all this code gets thrown out completely." His stated goal is to evaluate how difficult it would be to make the Rust version pass Bun's test suite and remain maintainable.
Key technical achievements include:
- 99.8% of Bun's pre-existing test suite passes on Linux x64 glibc
- 760,000 lines of code in the current Rust port branch
- 1,799 files changed across 43 commits
- AI-assisted translation using Claude for large-scale code migration
Community Response and Technical Implications
The announcement generated significant discussion on Hacker News, reaching 385 points with 372 comments. Developers debated the trade-offs between Zig and Rust, the feasibility of AI-assisted code migration, and whether such a large-scale rewrite would be practical. Sumner, who serves as the developer building Bun at Anthropic, also published a Zig-to-Rust porting guide that sparked speculation about migrating away from Zig.
The Register covered the experimental port, noting that despite the project's scale, Sumner remains cautious about its future, stating he is "curious to see what a working version of this looks like." The project demonstrates both the potential and limitations of AI-assisted code migration, as even with Claude's help, achieving the final percentage points of compatibility required significant engineering effort.
Key Takeaways
- Bun's experimental Rust rewrite achieved 99.8% test compatibility on Linux x64 glibc using AI-assisted migration
- The port includes 760,000 lines of code across 1,799 files, translated with help from Claude
- Bun developer Jarred Sumner emphasized the rewrite remains experimental with no commitment to replace the Zig codebase
- The project represents one of the largest AI-assisted code migrations attempted to date
- Community discussion focused on language trade-offs and the feasibility of AI-driven rewrites at this scale