Anime, manga, and games, with a take · A Yukimedia publication

← all stories other 1 sources · 1h ago ·

Bun Completes Full Rewrite From Zig to Rust Using AI in 11 Days

The project demonstrates that AI-assisted codebase rewrites can collapse a year-long engineering effort into under two weeks, changing assumptions about when a full language migration is feasible.

Reporting from 1 source: GIGAZINE.

Bun Completes Full Rewrite From Zig to Rust Using AI in 11 Days

The Bun development team has finished rewriting all 530,000 lines of Zig code into Rust using the AI coding assistant Claude Code. The rewrite took 11 days with one engineer, a task the team estimated would take a full year by hand. The move aims to reduce memory-related bugs and improve long-term maintainability.

Bun creator Jarred Sumner announced that the JavaScript runtime's entire codebase has been ported from Zig to Rust using Claude Code, an AI coding assistant built on Anthropic's Claude Fable 5 model. The rewrite covered 535,496 lines of Zig code and took 11 days of continuous execution across about 50 workflows, with one engineer reviewing and correcting the AI's output. Sumner had previously called a full rewrite 'the worst idea in history' because it would freeze bug fixes, security patches, and feature development for a year. The AI-assisted approach let the team clear 100 percent of the test suite on all platforms in under two weeks.

Zig creator Andrew Kelley responded on his blog, saying he was 'relieved' when Anthropic acquired Bun and 'thrilled' when the Rust rewrite was announced. Kelley criticized Bun's Zig codebase as a stack of hacks with reckless feature additions and little time spent on refactoring or technical debt. He also claimed the Bun team told him in a phone call that they had done no fuzzing. Sumner disputed that claim on Hacker News, linking to evidence of continuous fuzzing tests. Bun will continue development on the Rust version starting with v1.4.

Synthesized by Yomimono from the 1 cited source below, including Japanese-language reporting where cited, then editorially reviewed before publishing.

Sources