AI Porting: Claude Rewrites Bun Codebase in Rust

The JavaScript and TypeScript server and bundler Bun will consist of Rust code in the future. Within weeks, Claude Code ported the software.

listen Print view
Rust logo, pencil, compass

(Image: iX)

3 min. read

Bun once set out to replace Node.js as a JavaScript server, NPM as a package manager, and bundlers like esbuild with a single piece of software. At the end of 2025, the AI company Anthropic took over the open-source project and the Bun development team. The reason: Anthropic already uses Bun for Claude Code and the Claude Agent SDK.

Now it is becoming clear that the takeover of the project by the AI company Anthropic will not be without consequences. At the end of April, a branch appeared in which the language model Claude, on instruction, migrated the entire codebase from Zig to Rust. On May 5th, Jarred Sumner, founder of Bun, commented on this development and tried to calm a discussion: “I work on Bun and this is my branch. This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely.”

Videos by heise

But it turned out differently, and the approaches were not discarded. On May 14th, the changes were merged into the main branch – 2188 files changed, one million lines rewritten, and 4000 lines deleted. Bun is now written entirely in Rust.

This approach is not met with universal enthusiasm. While Jarred Sumner announces on GitHub that he will publish details in a blog post, the discussion under the contribution begins. Among other criticisms is that some old tests were changed so that the Rust version passes them successfully. Commentators react to Jarred's statement, “we now have compiler-assisted tools for catching & preventing memory bugs,” by saying that this is only true if the keyword unsafe is not used inflationarily in the code, as Claude did.

For the Bun team, the biggest part of the work is just beginning: The GitHub issues are already accumulating the first problems that did not occur with the Zig version. The Rust version has not yet been released with a version number, but that seems to be only a matter of time. Anyone using Bun and wanting to wait and see should pin their version to 1.3.14. This could be the last Zig version.

A complete migration of a project of this size, entirely done by an LLM – this is a novelty in software development. Jarred has not yet revealed how many tokens Bun spent on it. Only with this information could one calculate what such a migration would cost if one were not just acquired by Anthropic.

(jam)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.