Jarred Sumner merges Bun's Rust rewrite into main

Bun's creator says the Rust port passes tests, trims 3-8 MB off the binary, stays neutral-to-faster in benchmarks, and brings compiler-assisted memory safety.

By ·

Why it matters

A full-core rewrite is rare and risky, but it resets Bun’s engineering surface for the next stage: fewer memory bugs, smaller binaries, and a safer base to add features faster. For teams betting on Bun in production, this is a signal that the founder is prioritizing stability and maintainability over short-term feature churn.

Jarred Sumner merges Bun's Rust rewrite into main

Jarred Sumner merged a Rust rewrite of Bun, the JavaScript runtime, into the main codebase in a pull request on GitHub.

Sumner framed the move as a long-term bet on stability and developer velocity. In the PR discussion, he wrote that the new core gives the team "compiler-assisted tools for catching & preventing memory bugs, which have costed the team an enormous amount of development & debugging time over the years" linking to the PR.

What shipped

According to Sumner's notes in the PR:

  • Bun's pre-existing test suite passes on all platforms.
  • The binary is 3 MB to 8 MB smaller.
  • Benchmarks are between neutral and faster.
  • The architecture and data structures remain the same, Bun still uses few third-party libraries, and there is no async Rust in this change.

Developers can try it today on the canary channel:

bun upgrade --canary

He asked users to file issues if they hit problems and flagged that some optimization and cleanup work will land in follow-up PRs before this becomes the default in non-canary builds.

Why now

Sumner has spent years chasing performance and correctness bugs in a tight codebase. The rewrite is aimed at turning those firefights into guardrails: smaller, safer binaries and tools that catch entire classes of memory errors earlier. The team kept the existing architecture to avoid breaking changes while shifting to a language with stronger safety guarantees.

What changes for developers

For most developers, not much changes in day-to-day usage right now. Sumner says the rewrite preserves Bun's architecture and APIs, with the immediate wins being stability and binary size. If you are running canary builds in CI or local development, expect neutral-to-better performance and report regressions to help stabilize the release.

What is next

The PR notes remaining optimization and cleanup before it rolls into the non-canary release. Sumner indicated follow-on PRs are coming, and he is prepared to lock the discussion if threads get noisy so the team can ship.

The oven-sh/bun project has grown quickly on GitHub, and this kind of internal replatforming is a founder call: trading near-term feature work for long-term maintainability. Sumner is betting that moving core systems code to Rust will pay down years of debugging debt and let the team ship faster from here.

Reader comments

Conversation for this story loads after sign-in.