{"rewrite":{"id":"r_76f596ef02adda50c90e25b2","clusterId":"c_8b7577d85c1d18b0ac4dcf5f","slug":"bun-completes-full-rewrite-from-zig-to-rust-using-ai-in-11-days","model":"deepseek-v4-flash","headline":"Bun Completes Full Rewrite From Zig to Rust Using AI in 11 Days","summary":"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.","whyItMatters":"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.","webCardHtml":"\u003cp\u003eBun creator Jarred Sumner announced that the JavaScript runtime\u0026#39;s entire codebase has been ported from Zig to Rust using Claude Code, an AI coding assistant built on Anthropic\u0026#39;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\u0026#39;s output. Sumner had previously called a full rewrite \u0026#39;the worst idea in history\u0026#39; 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.\u003c/p\u003e\u003cp\u003eZig creator Andrew Kelley responded on his blog, saying he was \u0026#39;relieved\u0026#39; when Anthropic acquired Bun and \u0026#39;thrilled\u0026#39; when the Rust rewrite was announced. Kelley criticized Bun\u0026#39;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.\u003c/p\u003e","blueskyPost":"Bun's 11-day AI-assisted rewrite from Zig to Rust cuts a year of manual work to under two weeks. The speed raises a question the Zig ecosystem now has to answer: does a 530,000-line migration prove the toolchain is replaceable?","twitterPost":"Bun's 11-day AI rewrite from Zig to Rust cuts a year of manual labor to two weeks. The speed is the story.","threadsPost":"Bun's 530,000-line Zig codebase moved to Rust in 11 days with one engineer and Claude Code. The team estimated a year by hand. The migration targets memory bugs and long-term maintainability, but the speed itself is the detail that changes how the ecosystem sees Zig's future.","newsletterBlurb":"Bun's entire codebase has moved from Zig to Rust, a rewrite that took 11 days with AI assistance from Claude Code. The team estimates a manual rewrite would have taken a year. Zig creator Andrew Kelley welcomed the change but disputed Bun's claims about fuzzing practices.","attributionJson":"[{\"source\":\"GIGAZINE\",\"url\":\"https://gigazine.net/news/20260712-bun-zig-rust/\",\"title\":\"AI「Claude」を使って開発ツールの「Bun」の53万行のZigコード全てをRustへ書き換え、Zig作者もブログで反応\"}]","lintFlagsJson":null,"lintHits":0,"costUsd":0,"inputTokens":5337,"outputTokens":667,"status":"published","repairAttempts":0,"nextRepairAt":null,"factsAttemptedAt":1783845811,"createdAt":"2026-07-12T08:34:46.000Z","publishedAt":"2026-07-12T08:37:29.000Z","updatedAt":"2026-07-12T08:34:46.000Z"},"cluster":{"id":"c_8b7577d85c1d18b0ac4dcf5f","canonicalTitle":"AI「Claude」を使って開発ツールの「Bun」の53万行のZigコード全てをRustへ書き換え、Zig作者もブログで反応","representativeArticleId":"a_c12c5e75b0e978a94300c022","sourceCount":1,"writtenSourceCount":1,"writeAttempts":0,"isSolo":true,"entitiesJson":"{\"anime_titles\":[],\"manga_titles\":[],\"work_titles\":[],\"studios\":[],\"people\":[],\"type\":\"news\",\"domain\":\"other\",\"is_roundup\":false}","contentType":"news","status":"published","firstSeenAt":"2026-07-12T08:00:00.000Z","lastSeenAt":"2026-07-12T08:00:00.000Z","updatedAt":"2026-07-12T08:37:29.000Z"},"attribution":[{"source":"GIGAZINE","url":"https://gigazine.net/news/20260712-bun-zig-rust/","title":"AI「Claude」を使って開発ツールの「Bun」の53万行のZigコード全てをRustへ書き換え、Zig作者もブログで反応"}],"entities":{"anime_titles":[],"manga_titles":[],"work_titles":[],"studios":[],"people":[],"type":"news","domain":"other","is_roundup":false},"keyFacts":null}
