Bun Rolls Back Rust Rewrite Following Community Backlash, Will Rewrite Zig in Rust Instead

Share

'Nothing changes for users,' says team whose runtime has changed languages twice this quarter

SAN FRANCISCO—Responding to weeks of community criticism over its decision to port the Bun JavaScript runtime from Zig to Rust, Anthropic announced Tuesday that it will restore the original Zig codebase and instead rewrite the Zig compiler itself in Rust, allowing Bun to remain "a Zig project in every sense except the one people mean."

"We heard the community loud and clear: Bun should be written in Zig," said Jarred Sumner, Bun's creator. "So Bun is written in Zig. Zig is written in Rust now. The architecture doesn't change. The data structures don't change. The only thing that changes is what the words refer to."

The new compiler, developed in a branch titled claude/phase-b-zig-itself, comprises 11,204 commits authored over four days, none by a human. The pull request was approved by two automated reviewers, one of which cited the other as a source. The sole human on the reviewer list, a contributor identified as alii, remains listed as "Awaiting requested review," a status the team has adopted as an internal philosophy.

"Awaiting requested review is really a mindset," explained Bun's head of developer relations, Priya Natarajan. "The tests pass. 99.8% of them. At some point, reading the code is just a vibes-based activity."

Asked how the same test suite that failed to catch the memory bugs motivating the original rewrite could now validate a compiler no human has read, Natarajan described the question as "not sufficiently in-the-weeds" and hid the reporter.

The announcement included a benchmark showing the Rust-based Zig compiler builds Bun 41% faster than the previous toolchain. Engineers later attributed the entire improvement to a linker flag that has shipped with Zig since 2019, which the team said proves the rewrite was necessary in order to discover the flag.

The company's 300-rule porting guide was updated to include:

  • Rule 1: The port must be faithful to the original, which must be faithful to the port
  • Rule 47: Any unsafe block must include a comment explaining why it is safe, written by the same model that wrote the block
  • Rule 113: If a test fails, the test was measuring the wrong thing
  • Rule 300: Do not read rules 2 through 299. They were generated to hit a round number.

Zig Software Foundation president Andrew Kelley responded within hours with a 6,000-word blog post titled "This Is Not Personal," which contains the word "Jarred" 174 times. In it, Kelley notes that the Zig compiler previously built from source in 16 seconds, while the Rust version builds in 40 minutes, "or one Rust compile, the universal unit of time."

"They didn't rewrite Zig," Kelley wrote. "They rewrote the concept of attribution. Every performance gain in that post was sitting in a flag we shipped seven years ago, and every bug they fled from is one an engineering culture would have fixed. But sure. The borrow checker did it."

Two founders of venture-backed companies that rewrite things in Rust using language models condemned the post's tone within the hour, each opening with a statement that they had planned to remain silent. Neither addressed its contents, which both described as "not the point."

Sumner, reached for comment, first disputed the premise that he had been reached.

"I want to be careful here, because I prefer that things I work on not be associated with hype," he said. "We have not committed to keeping the rewrite of the compiler that compiles the rollback of the rewrite. There is a very high chance all of it gets thrown out. What I can say is that LSP is enabled by default, it does not make Claude 600x faster, and the bundler still blocks one thread that could be doing work. I think about that thread more than I think about my family."

When a supporter replied praising Sumner for refusing to engage in hype even slightly, he responded with a laughing emoji and four corrections, the last of which was to the word "slightly."

Industry analysts praised the move. "It's genuinely elegant," said Forrester analyst Dana Whitmore. "The Zig community wanted Bun to stay Zig. The Rust community wanted proof their language wins rewrites. Anthropic wanted a case study for the model. Everyone got exactly what they asked for, which is how you know nobody got what they wanted."

The Zig Software Foundation confirmed it has still not received a donation from the Bun team, but noted that traffic to Kelley's blog is up 4,000% and that it is "exploring whether grievance can be annualized."

At press time, a new branch had appeared in the Bun repository titled claude/phase-c-closure, containing an in-progress rewrite of Rust in Zig, which the model described in its own commit message as "a gesture of respect, or possibly the beginning of a cycle. Awaiting requested review."

Anthropic's valuation rose $40 billion on the news.


Tomorrow: "Node.js Maintainers Announce It Was Written in Rust the Whole Time, No One Checked"

Read more