[00:02] JavaScript toolkit that was acquired by Anthropic late last year, announced that they spent the equivalent of $165,000 running 64 parallel clot agents to refactor their entire codebase from Zigg to Rust in just 11 days. Usually, a full [00:17] rewrite to Rust is the swan song of any startup about to get Rick James by the invisible hand of the market, but in this case, it may have actually worked. The millionline port fixed 128 old bugs, shrunk the binary by 20%, made [00:30] everything a few% faster, and has already been powering Claude code since June without anyone noticing. But not everyone is celebrating. Andrew Kelly, the creator of Zigg, responded claiming the benchmarks are misleading, and the [00:42] Zig team is actually relieved to see Bun go because internally they used its codebase as an example of how not to write Zigg and that Jared, Bun's founder, was producing SLOP long before LLM existed. In today's video, we'll [00:55] find out how the biggest AI powered rewrite in history actually went down public opinion in the divorce. It is July 15th, 2026, and you're watching the was throwing Japan airs in the warehouse, Joel Spolski wrote one of the [01:10] most famous blog posts in software history where he claimed that rewriting strategic mistake a software company can make. His example was Netscape, who browser while Microsoft stole their women and pillaged their village. So, [01:24] what led Bun to fall to the temptation of the single word strategic mistake they could make? Well, it's actually the same thing that led you to fail CS 101, switch majors, and become a JavaScript developer, but poor memory management. [01:36] With Zigg, the language Bun was originally written in, you manually from the compiler. That's usually a feature of a low-level language because Bun embeds JavaScript core, which is Safari's garbage collected JavaScript [01:49] engine. Half of Bun's objects were owned by the garbage collector, while the other half lived in manually managed Zig memory, and the two had to constantly manage pointers to each other, which led to a codebase that looked like it had an [02:01] change logs are full of bugs stemming from this, where code was reading memory that had already been freed, or freeing the same memory twice, or just never freeing it at all. At one point, the dev server was leaking three megabytes every [02:14] error path forgot to clean up after itself. And though memory bugs alone there was still a bigger problem. Once Anthropic acquired Bun, the majority of its future code was going to be written by Claude. And Zigg is famously anti- [02:29] AI. So much so that they refuse LLM generated pull requests and they'll even close your security report if you admit AI found the bug. On top of that, the internet to train on, and the language itself hasn't hit 1.0 yet, so [02:43] models just aren't very good at writing it compared to more established languages. And so in early May, Jared decided to fix both problems at once by porting all 535,000 lines of Zigg to Rust, whose borrow checker would move [02:58] memory management into the type system, which made most memory mismanagement a compile time error rather than a runtime error. But the most interesting part is how they did it. They first had Claude spend hours studying the codebase to [03:10] workflow that traced the lifetime of every struck field into a giant spreadsheet, essentially documenting years of tribal knowledge about who frees what and when. From there, they used 64 parallel CLA agents across four [03:23] git workrelate all, 1448 files, at one point cranking out 1300 lines of Rust per minute. And to keep the agents honest, every implementer was paired with two adversarial reviewer clouds running in [03:36] separate context windows whose only job was to assume the code was wrong and was to assume the code was wrong and find out why. 11 days, 6,52 commits and what would have been $165,000 in spend if they didn't own the token [03:48] casino later. Bun's entire test suite was passing on every platform. The port fixed 128 long-standing bugs. The dev servers memory leak issues resolved, but binaries got 20% smaller. and Andrew Kelly, the creator of Zigg, lost his [04:02] mind. In his response, Andrew makes it clear that this divorce was years in the making. According to him, the Zigg team spent years watching Bun embarrassed their language with a codebase they privately used as the example of how not [04:14] personal swings, pointing out that Jared skipped college at 18 to take Peter Teal's money and Chase startup glory, which Andrew blames for his beginner energy and passing along secondhand reports that Jared wasn't exactly a [04:27] great manager to work under. But buried under the resentment are some legitimate performance gains mostly came from link time optimization which Zig has supported the whole time that the binary size reduction had nothing to do with [04:40] Rust and that Jared conveniently left out any reference to compile times which Zigg almost certainly wins. So the question is who gets custody of public opinion? Well, probably nobody. Zigg lost its most famous user. Andrew lost [04:52] his cool and Jared got publicly diagnosed with beginner energy by a compiler engineer. But if you're looking to rewrite your own codebase in Rust or you need to know about Code Rabbit, the sponsor of today's video. Writing [05:05] thousands of lines of code with AI feels great until you have to review all that unholy slop by hand. Code Rabbit Review turns your pull requests into guided walkthroughs you'll actually finish. It groups related changes into cohorts, [05:17] orders them into layers, and adds AI summaries so you can move through all the changes quickly in the right order. Instead of one giant flat diff, it feels like an IDE for your pull requests. Your comments and approvals still go back to [05:29] GitHub natively. And when it helps, the Code Rabbit can generate inline diagrams for your call flows, state changes and schema updates. Over 100,000 open- source projects like Bun and Nex.js use Code Rabbit, and you can try it out for [05:42] been the Code Report. Thanks for watching, and I will see you in the next watching, and I will see you in the next one.