Rewriting Bun in Rust
Simon Willison 1 week ago
Jarred Sumner rewrote the Bun runtime from Zig to Rust using AI agents to automate the port, addressing memory safety issues that caused use-after-free and double-free bugs in the original codebase. The rewrite consumed 5.9 billion input tokens and 690 million output tokens across 11 days of agent-assisted development, with costs estimated at $165,000 at standard API pricing. Startup performance on Linux improved 10 percent, and the new Rust version has been running in Claude Code since June 17th with minimal user-visible changes.