Updates

Bun’s Rust rewrite reaches 99.8% test compatibility in six days

Bun’s Rust port hit 99.8% of its test suite on Linux x64 glibc after six days. That leaves about one test in 500, but the rewrite is already massive.

Jamie Taylor··2 min read
Published
Listen to this article0:00 min
Share this article:
Bun’s Rust rewrite reaches 99.8% test compatibility in six days
Source: imgix.cosmicjs.com

Bun’s experimental Rust rewrite has already cleared a milestone that most ports never reach so quickly: 99.8% compatibility with its pre-existing test suite on Linux x64 glibc. In practice, that means nearly the entire runtime is already behaving like the old codebase, with only a tiny slice of failures still standing between a proof of concept and a full migration.

Jarred Sumner described the new code as “basically the same codebase,” but with one major shift: Rust can enforce lifetimes, and destructors are available when they are actually wanted. That changes more than syntax. Sumner said the places where code becomes unsafe are now easier to spot, which pushes the team toward refactoring instead of relying on convention and discipline to keep memory bugs hidden.

AI-generated illustration
AI-generated illustration

The scale is striking. Sumner said the port reached this point after only six days and covered about 960,000 lines of code. That is not a small refactor or a hand-waved “rewrite someday” plan. It is a large, active migration already deep enough to run almost all of Bun’s existing tests, which makes the remaining 0.2% a live signal for anyone watching compatibility risk. At that level, the unresolved cases are no longer abstract. They are the places where edge-case behavior, unsafe code, or platform-specific assumptions still need attention before the rewrite can be treated as a real replacement.

The motivation behind the shift is equally blunt. Sumner said he is tired of spending time worrying about memory leaks, crashes, and stability issues, and wants a language with stronger tools for preventing them. He also stressed that this was not the result of an AI prompt magically generating a new runtime. A fuller write-up is planned on the process, benchmarks, memory use, and maintainability tradeoffs, but the message in the meantime is clear: Rust is being chosen for long-term control, not novelty.

That choice lands inside a runtime that already has a lot at stake. Bun launched 1.0 on September 8, 2023 as stable and production-ready, and its homepage still frames the project as an all-in-one JavaScript, TypeScript, and JSX toolkit aiming for 100% Node.js compatibility. Bun was acquired by Anthropic on December 2, 2025, with Anthropic saying Claude Code ships as a Bun executable to millions of users. Bun v1.3.13 also landed on April 20, 2026 with new bun test flags like isolate, parallel, and shard, underscoring how central test infrastructure already is to the project.

Related stock photo
Photo by Daniil Komov

That is why 99.8% matters here. Bun is not merely flirting with Rust. It is trying to prove that a massive runtime can change its core language, keep almost all of its tests green, and use the rewrite to cut the very risks that have kept memory leaks, crashes, and stability bugs in the spotlight.

Know something we missed? Have a correction or additional information?

Submit a Tip

Never miss a story.

Get Rust Programming updates weekly. The top stories delivered to your inbox.

Free forever · Unsubscribe anytime

Discussion

More Rust Programming News