Full article: https://bun.com/blog/bun-in-rust Bun is owned by Anthropic. Jarred used Claude Fable 5 (pre-release) to fully rewrite Bun from Zig to Rust single handedly in 11 days and Claude Code v2.1.181 (released June 17th) and later use the Rust port of Bun already. Crazy that LLMs are making a lot of things possible which otherwise wouldn’t see light of the day due to massive efforts involved. TL’DR highlights from the article. Bun is 535,496 lines of Zig. A rewrite to Rust by hand would’ve taken 3 engineers with full context on the codebase about a year, during which time we wouldn’t be able to improve Node.js compatibility, fix bugs, fix security issues or implement new features. We never would’ve done that. The realistic alternative was to do nothing and keep fixing the bugs at the top of this post forever . Before writing any code, I spent about 3 hours talking to Claude about how to map patterns from our Zig codebase closely to Rust. Claude serialized this discussion into a PORTING.md , which ended up on Hacker News . I rewrote Bun in Rust using about 50 dynamic workflows in Claude Code run continuously over the course of 11 days. I used a pre-release version of Claude Fable 5 , a Mythos-class model. Claude Code’s dynamic workflows kept 64 Claudes running for 11 days (I would’ve had to write my own harness to pull this off otherwise). For most of those 11 days (and after), I monitored workflows - manually reading the outputs to check for issues and bugs, and prompting Claude to edit the loop to fix things. How do you review a PR with +1 million lines added? How do you start to build the confidence needed to responsibly merge large quantities of LLM-authored code? Answer Adversarial review asks Claude (in a separate context window) to exhaustively come up with reasons why the changes create bugs or do not work. Split context windows Usually with humans, the person reviewing the code is not the person who authored the code. The person writing the code wants to merge the code, which can bias their actions to ship before it’s ready. Claude is the same way. The Claude that wrote the code wants the code to get accepted. The Claude that reviews wants to find issues in the code. 1 implementer, 2 or more adversarial reviewers per implementer. The reviewer’s only job: find bugs & reasons why the code does not work. The implementer doesn’t review. The reviewer doesn’t implement. Outcome Bun v1.3.14 was the last version of Bun written in Zig. Bun v1.4.0 will be the first version of Bun written in Rust. It’s available in canary now So far, Bun v1.4.0 fixes 128 bugs that reproduce in v1.3.14. These range from memory leaks to crashes to miscolored help text. Reduced memory usage. We fixed every instrumentable memory leak In Bun v1.3.14, every build leaks about 3 MB, forever — tools like dev servers that bundle on every request eventually run out of memory. In Bun v1.4.0, memory levels off Combined with the Rust rewrite, ICU changes, and identical code folding, Bun’s binary size shrinks by ~20% on Linux & Windows. Bun v1.4 makes Bun faster, smaller, use less memory and gives the team incredibly powerful tools for systematically improving stability going forward Claude Code v2.1.181 (released June 17th) and later use the Rust port of Bun. Startup got 10% faster on Linux but otherwise, barely anyone noticed. Boring is good. Conclusion This Rust rewrite would’ve taken a team of engineers with full-context on the codebase a year of work. With 1 engineer using Fable & closely monitoring Claude Code, we went from start to 100% of the test suite passing on all platforms in 11 days. This is the bleeding edge of what’s possible today. One engineer can do a lot more today than a year ago. submitted by /u/simple_explorer1
Originally posted by u/simple_explorer1 on r/ClaudeCode
