2d ago

Bun merges one-million-line pull request rewriting codebase to Rust

0

Bun merged a one-million-line pull request that rewrites its codebase from Zig to Rust directly into the main branch. The pull request incorporated extensive assistance from Anthropic’s Claude model. Simon Willison’s Weblog presented the migration as evidence of reduced language lock-in, citing Mitchell Hashimoto’s remarks and a separate coding-agent rewrite of legacy iPhone and Android apps to React Native.

Original post

fully clauded 1 million line PR merged directly into main, what could possibly go wrong

8:24 AM · May 14, 2026 View on X
Reposted by

Mitchell's post here reminded me of a similar conversation I had recently about how cheap it can be to port native mobile apps to React Native using coding agents... and then port them back again later if it turns out not to work out https://simonwillison.net/2026/May/14/not-so-locked-in/

Mitchell HashimotoMitchell Hashimoto@mitchellh

It isn't unexpected that the focus of the Bun Rust rewrite is on the anti-Zig side more than anything, since the internet loves to hate. What is unexpected and unfortunate is that leadership within Bun hasn't tried to steer the conversation away from that at all. There are so many positive and interesting takeaways from this and I'm not really seeing any of them pushed as the primary message. A positive thing that hasn't been talked about at all is how far Bun came thanks to Zig. And even if you dump it now, its meaningful for how good Zig was to even build a product to this point and impact by any metric. I would've loved to see anyone in leadership say this. On the interesting side is how fungible programming languages are nowadays. Programming languages used to be LOCK IN, and they're increasingly not so. You think the Bun rewrite in Rust is good for Rust? Bun has shown they can be in probably any language they want in roughly a week or two. Rust is expendable. Its useful until its not then it can be thrown out. That's interesting! There's been a lot of talk about memory safety and no doubt Rust provides more guarantees than Zig. But I'd love to see a better analysis of why Bun in particular suffered so much rather than take the language-blame path. How could engineering as a practice been more rigorous to prevent this? What were the largest sources of crashes other programs should watch out for? How does Rust prevent them? How could Zig theoretically prevent them? That's interesting. I know the official blog post hasn't come out yet from Bun. But they're smart enough to know that that PR would stir up controversy the moment it opened, or they should've been. And plenty in the company have been tweeting and writing about it. Its somewhat telling to me in various dimensions what they chose to talk about first. I tend to think I'm pretty good at corporate PR/comms (especially when it comes to developer audiences) and I think appealing to the negative is never the right long term strategy; it does work to get short term eyes though.

9:36 PM · May 14, 2026 · 281K Views
10:58 PM · May 14, 2026 · 51.6K Views
Bun merges one-million-line pull request rewriting codebase to Rust · Digg