← All stories
● Covered by 1 source · 6 reportsMedium impact1 negative2 neutral

Bun JavaScript Runtime Rewritten in Rust, Adopted by Claude Code

🔄 Updated 70d ago — new reporting from Hacker News Front Page
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Bun runtime rewritten from Zig to Rust.
  • Claude Code v2.1.181 uses Rust Bun, improving Linux startup by 10%.
  • Bun was acquired by Anthropic in December 2025.
  • Cruller project forks Zig Bun for production JavaScript servers.
  • Cruller achieves an 18% size reduction compared to Bun 1.3.14.
  • Claude Fable 5 was used for much of the Rust rewrite.
  • Bun started as a port of esbuild's transpiler from Go to Zig.
  • Bun's initial version was written in 1 year.
  • Cruller removes the package manager, bundler/transpiler, shell, and test runner.
  • Cruller uses a vanilla Zig 0.16 build graph.
  • Buz is a fork of Bun based on its pre-Rust rewrite commit.
  • Buz aims for sub-1s incremental builds.
  • Buz has removed over 11,000 lines of dead code.

Bun Transitions to Rust

The Bun JavaScript runtime, initially developed in Zig, has undergone a rewrite in Rust. This change follows Bun's acquisition by Anthropic in December 2025. The rewrite was partly facilitated by a pre-release version of Claude Fable 5.

Bun's original scope included a JavaScript, TypeScript, and CSS transpiler, minifier, bundler, an npm-compatible package manager, a Jest-like test runner, Node.js and TypeScript-compatible module resolution, an HTTP/1.1 and WebSocket client, and implementations of Node.js APIs like `fs`, `net`, and `tls`.

Performance and Adoption

The Rust port of Bun has been integrated into Claude Code v2.1.181, released on June 17th. This integration resulted in a 10% faster startup time on Linux. Evidence of the Rust version's use in Claude Code includes the presence of Bun v1.4.0 (a preview version) and Rust source file paths within the Claude binary.

The Rust version of Bun has also been released as Bun canary, available via `bun upgrade --canary`.

Cruller: A Production-Focused Fork

In parallel with Bun's move to Rust, a new project named Cruller has emerged. Cruller is a fork of the last Zig-based Bun release, specifically designed for running pre-built production JavaScript servers. It has been ported to vanilla Zig 0.16.

Cruller retains core functionalities such as JavaScriptCore, `Bun.serve`, HTTP/1-3, WebSockets, `fetch`, streams, `Blob`, `Request`/`Response`, static serving, and the module resolver for pre-built JavaScript. It intentionally removes development-oriented features like the package manager, bundler/transpiler, shell, and test runner.

This focused approach allows Cruller to achieve an 18% size reduction compared to the official Bun 1.3.14 runtime, providing a smaller and more specialized runtime environment.

Context on Language Transitions

The rewrite of Bun from Zig to Rust contrasts with other projects in the ecosystem. For example, the Roc project's compiler team has been rewriting 300,000 lines of Rust code into Zig over the past year and a half, recently achieving feature parity with their original compiler. This allowed them to update the Rocci Bird game, resulting in a 31KB WebAssembly binary, which is less than half the size produced by their original compiler.

Updates

🕒 2026-07-24 · new reporting from Hacker News Front Page
  • Claude Fable 5 was used for much of the Rust rewrite.
  • Bun started as a port of esbuild's transpiler from Go to Zig.
  • Bun's initial version was written in 1 year.
  • Cruller removes the package manager, bundler/transpiler, shell, and test runner.
  • Cruller uses a vanilla Zig 0.16 build graph.
  • Buz is a fork of Bun based on its pre-Rust rewrite commit.
  • Buz aims for sub-1s incremental builds.
  • Buz has removed over 11,000 lines of dead code.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~34 min · 27 stories · Oct 02

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

How outlets covered it

Claims regarding Bun's rapid rewrite in Rust using Anthropic AI tools are being questioned due to a lack of new releases and a significant increase in open pull requests since the rewrite was supposedly completed. This analysis suggests the AI-driven rewrite may not be as complete or efficient as initially presented, raising doubts about the practical application of AI in large-scale code overhauls.

A new project called Buz has forked Bun, based on its pre-Rust rewrite commit, to rebuild it using modern Zig and achieve sub-1s incremental build times. The developer aims for Buz to be a drop-in replacement for Bun with a cleaner codebase, having already removed 11,000 lines of dead code and fixed numerous bugs.

Cruller is a new project that forks Bun's Zig runtime, specifically targeting production JavaScript server environments by removing development-oriented features and porting to vanilla Zig 0.16. This initiative aims to provide a smaller, more focused runtime for deploying pre-built JavaScript applications, offering an 18% size reduction compared to the official Bun 1.3.14 runtime.

Claude Code v2.1.181 now utilizes a Rust port of Bun, improving startup speed by 10% on Linux. This change is part of a continued effort to implement more efficient technologies across their platform, albeit with little visible impact to users.

The Roc project's team has rewritten 300,000 lines of Rust code into Zig and achieved feature parity with their original compiler. This milestone allows for the update of the Rocci Bird game, optimizing the output size significantly compared to the original compiler.

The Bun transpiler has been rewritten in Rust after its acquisition by Anthropic in December 2025. This transition aims to enhance stability and performance, addressing existing bugs and challenges in the Bun ecosystem.