Wessell's site logo Wessell's ☺️site

Opinion on Bun's RIIR 🍞

posted on 2026-05-18opinion

About a week ago, a 1-million line RIIR (Rewrite it in Rust) Pull Request written with Claude Code was merged in Bun’s repo. It has been a controversial move so far, with many people rightfully calling it “AI slop” that it is.

Screenshot of oven-sh/bun/30412 Pull Request

It’s meant to be a one-to-one translation of the code from Zig to Rust. In my opinion, it’s probably too early to call the shot on whether this is objectively a good technical decision (I believe it’s not, and so does many people). However, personally, I believe the trust and goodwill that people had in Bun is mostly gone by this point.

Let’s have a quick look at the timeline to see what led to this:

What had transpired

The Beginning

On 2026-05-04, Jarred Sumner, the creator of Bun, made a commit that added a file doc/PORTING.md which is a detailed guide on how to port individual Zig files to Rust with the commit message “docs: add Phase-A porting guide”. Judging by the formatting of the file, it was meant as a reference for Claude Code. This commit was paired with branches prefixed by claude/.

Screenshot of first few lines of doc/PORTING.md

Response to Backlash

People spotted this commit and were upset in the comments on GitHub and on Hacker News, the latter of which was where Jarred responded to the outrage on 2026-05-05:

I work on Bun and this is my branch

This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely.

I’m curious to see what a working version of this looks, what it feels like, how it performs and if/how hard it’d be to get it to pass Bun’s test suite and be maintainable. I’d like to be able to compare a viable Rust version and a Zig version side by side.

The Merge

However, 9 days later on 2026-05-14, the 1-million line RIIR PR was merged into the main branch of Bun.

Aftermath

On 2026-05-15, an issue was opened on the repo, stating that the resultant code fails a Miri check (Miri is a Undefined Behavior detector for Rust). A fix for it was generated by robobun (which I presume is powered by Claude Code) and reviewed by Claude, so it’s basically an auto-generated fix. This has yet to be merged at the time of writing.

My Opinion

What a shitshow.

First of all, I wouldn’t say Jarred lied, since it was an experiment and people are allowed to change their minds. However, it’s hard not to see a “conflict of interest” (it’s not really one, since Anthropic bought Bun 5 months ago) that Bun would be using Claude Code to aid Bun’s development. It’s also important to look at what changed after the acquisition by Anthropic.

Anthropic’s Influence in the Project

Anthropic bought Bun to help out with Anthropic’s products, duh, who could have seen it coming. But let’s back that up:

Why this move was made (Speculation)

If this move was so bad, why was it made? The most likely answer is that Zig, the original language that Bun was written in, is quite hostile towards LLM-assisted contributions. Since I am not familiar with Zig, I’d recommend you to read Simon Willison’s article on Zig’s stance of LLM.

In short, Bun had to maintain their own fork of Zig because they achieved great speed improvements on Zig but were not allowed to merge those improvements upstream since those improvements were authored by LLMs. As you can imagine, keeping up with a hostile upstream is quite burdensome, so that’s one of the reasons why Bun broke away from Zig.

Another reason is, as said by Jarred in the RIIR PR:

we now have compiler-assisted tools for catching & preventing memory bugs, which have costed the team an enormous amount of development & debugging time over the years.

Basically, they want to use Rust’s language features to catch bugs. However, at the current stage, the port is just a one-to-one translation from Zig to Rust, which leads to a lot of unidiomatic code, and which could lead to bugs like undefined behavior. The fact that tools like Miri wasn’t used before merging the code into main probably shows the Bun team isn’t yet familiar with Rust’s tooling (neither am I, so I won’t judge any further), which is quite concerning.

There were rumors (I’m not sure if it’s a rumor or an actual confirmation) that Bun has hired or is planning to hire actual Rust devs, but even then, how are humans meant to deal with the fallout of a 1-million line RIIR. More Claude Code?

What Next?

Personally, I’m quite skeptical of Bun’s future development. It is still the fastest JavaScript runtime so far, outperforming Deno and NodeJS by large margins, and even though the RIIR has been merged, the latest release is still based on the latest Zig code.

Therefore, I’m gonna stay on Bun v1.3.3, the last release before Bun’s acquisition by Anthropic, and see how everything goes. Perhaps a switch to Deno is in the plans?

Further Reading