July 8, 2026

Rewrite club just got weirder

Rewriting Bun in Rust

Bun ditched Zig for Rust, and the internet instantly turned it into a joke war

TLDR: Bun’s creator says he used AI to help rewrite a huge chunk of the project in a safer language after too many crash bugs, and the new version is already live. The community reaction was peak internet: part impressed, part snarky, with duplicate-thread policing and jokes about rewriting Rust next.

The big headline is wild enough on its own: Bun, the fast app tool built by Jarred Sumner, was rewritten from Zig to Rust in just 11 days with heavy help from artificial intelligence coding agents. Sumner says the old version kept him up at night because of nasty crash bugs and memory mistakes, and the new language choice was all about making those problems harder to create in the first place. Even more eyebrow-raising? The project reportedly chewed through the kind of computing bill that would make most startups faint: about $165,000 worth of tokens at normal prices. And yet after all that drama, the result was almost hilariously uneventful in public: startup got a bit faster, and most users barely noticed. In software land, boring is the dream.

But the comments immediately did what comments do best: they swerved from awe to nitpicking to pure comedy. One poster jumped in with classic forum-police energy, declaring it a duplicate thread and redirecting everyone to the “real” discussion, which gave the whole thing a petty hall-monitor subplot. Then came the joke that stole the show: “Is anyone working on rewriting Rust in Bun?” That one perfectly captured the community mood — half impressed by the audacity, half ready to meme the whole rewrite-industrial complex into oblivion. The strongest vibe here wasn’t outrage so much as amused disbelief: people are watching a million-line AI-assisted rewrite land in production and reacting like, “Sure, but can we make the language rewrite itself next?”

Key Points

  • Jarred Sumner rewrote Bun from Zig to Rust and described the effort as an agent-assisted engineering project with dynamic workflows, trial runs, and adversarial review.
  • The article says the rewrite was driven mainly by memory-management bugs such as use-after-free, double-free, and missed frees in error paths.
  • Bun’s TypeScript test suite served as a language-independent conformance suite that enabled automation of much of the initial port.
  • Sumner says he spent 11 days monitoring workflows, reviewing outputs, and improving the generation loop instead of hand-fixing generated code.
  • The Rust implementation has been used in Claude Code since v2.1.181 on June 17, with startup reported as 10% faster on Linux and estimated pre-merge API-equivalent token costs of about $165,000.

Hottest takes

"This is dupe of an ongoing discussion" — rvz
"The actual source post of this article can be read here" — rvz
"rewriting Rust in Bun" — halfcat
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.