Back Original

Successful Software Rewrites With AI

Last year in August I wrote a blog post where I predicted that it should be possible to do rewrite software projects using AI. Here’s an assessment of how much of that came true.

The one that made the headlines

In the first half of 2026, Anthropic rewrote the entire Bun javascript engine from Zig to Rust. Details are in Jared Sumner’s blog post. The important part is that it was done in about two weeks by one human engineer and a bunch of Claude Fable agents. It is true that the engineer was the original author of Bun. But there was no way this could have been done in the pre-AI era. It would have taken many engineers and years to complete such a task. Because, not only is it error-prone, it also has a ‘moving target’ problem. Suppose you rewrite it by hand by staying up at night. When you are done after a few months, the original software has changed. Bugs have been fixed and new features have been added. You catch up, and fall behind. This continues for a while until you run out of time or money.

The success of this particular project is proven by the fact that multiple AI coding agents like Claude Code, OpenCode etc were built on Bun, and they have continued to work seamlessly as the rewrite happened.

More examples collected by Gergely Orosz

Honestly I wouldn’t have written this blog post if I didn’t watch Gergely Orosz’s talk where he mentioned the following examples of software rewrites:

A tech influencer rewrote the TypeScript compiler

Nearly a month ago Theo, a popular tech influencer rewrote the TypeScript compiler, checker and LSP server to Rust.

Announcing tsc-rs (aka ts-rust), my complete rewrite of the Typescript compiler, type checker, and LSP, all in Rust.

This is a project I’ve had agents working on for 5 months now. I burned ~$400k of Codex tokens and got nowhere. Burned ~$20k of Opus and got there in 2 weeks.

I have not read a single line of the code.

tsc-rs is an open source drop-in replacement for tsc, and it’s available now.

— Theo - t3.gg (@theo) October 7, 2026

Cloudflare did two rewrites

Earlier in the year, Cloudflare rebuilt Next.js on top of Vite. It was done by one human engineer in a week. This was not a change in the underlying language or framework, unlike the previous examples. This was a different product with identical behavior as the original one - almost like Bun and Deno being replacements for Nodejs. Vinext is being maintained to be compatible with Nextjs, and AI is making that possible.

Recently, they also rewrote the TypeScript compiler to Rust. This has been a collaborative effort between Cloudflare, VoidZero. Theo and Max Schwenk, as explained in the blog.

What’s coming up

There are reports on multiple blogs which talk about Microsoft rewriting some parts of the Windows UI from React Native to the low-level WinUI library. I couldn’t find an official engineering blog yet. I think many tech companies have wished to rewrite their software for maintainability or performance. The availability of AI agents can turn those wishes into real plans. We’ll see more successful examples of these plans getting executed in the coming months.

At the same time - I believe humans are competitive. Now that machines have achieved a milestone first, humans might want to beat it. It is entirely possible that rewriting becomes part of standard software engineering practice, and we see humans doing it both with and without involving AI tools.