All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Bun's AI-Generated Rewrite from Zig to Rust: 1 Million Lines, 10,000+ Unsafe Blocks

By

By dreamreal|June 3, 2026|Updated 12:14pm ET

7h ago· 9 min readenInsight

Summary

Bun, the JavaScript runtime, has been rewritten from Zig to Rust through an AI-driven process. Anthropic (which acquired Bun in December) supplied Claude Code agents that generated over a million lines of Rust code across 6,755 commits in nine days. The rewrite passed 99.8% of existing tests but introduced more than 10,000 unsafe blocks, raising questions about whether the memory safety goals of Rust were actually achieved. The article explores the implications of AI-generated codebases, the irony of unsafe Rust blocks in a memory-safe language, and what this means for the future of software development.

Key quotes

· 5 pulled
we haven't been typing code ourselves for many months now
a little over a million lines of Rust, 6,755 commits, generated almost entirely by Claude Code agents over nine days
The Rust rewrite passed 99.8% of the existing tests
Memory safety is the main reason you'd pick Rust. So what did the rewrite actually accomplish?
the PR itself split almost evenly between thumbs-up and thumbs-down
Snippet from the RSS feed
Bun was ported from Zig to Rust by an LLM and passed nearly all its tests - while shipping more than ten thousand unsafe blocks. Memory safety is the main reason you'd pick Rust. So what did the rewrite actually accomplish?

You might also wanna read