r/bun
Change my mind: Zig was a mistake, Anthropic is using Bun to hype Claude and how Jared is baiting Rustaceans into doing the actual engineering work that his team cannot
Let's talk about the actual reasons behind Bun's sudden pivot to rewriting their runtime in Rust.
Remember the early days? Jared couldn't stop singing the praises of Zig. We got endless blog posts and tweets about why Zig was the only choice for low level, manual memory management without the hidden overhead, and blah blah blah. It was their entire identity. And we'll probably get more of those with the blog post they are cooking.
> As a side note, that has NEVER been the actual reason behind: JavaScriptCore (as always Apple delivering without credit) + better APIs + fresh start. Not to dismiss the original project by Jared: it was objectively better and nobody thought of doing it that way.
Fast-forward, and the reality of maintaining a massive runtime with increasingly features in a language without safety guarantees has caught up to them. But the "rewrite" isn't a natural technical evolution: it’s a corporate PR stunt by Anthropic and a cry for help. Here is what is actually happening behind the scenes:
Zig was an infrastructure mistake
Look, you are free to program in whatever language makes you happy. Zig is a cool project with some good ideas and some bad ideas, and I'm sure people enjoy hobbying in it. But people who actually ship critical, memory-intensive, enterprise-grade applications do it in C or C++. And they do it with LOTS of tooling created over the course of multiple decades. And even then, they fail to deliver on production. There is a reason why Rust exists, and that reason is what attracts seasoned C & C++ developers.
Bun tried to prove everyone wrong by building a core piece of web infrastructure on an esoteric toy language that learned nothing from C & C++ where the core maintainers literally dismiss basic industry standards like encapsulation because they think they know better than 70 years of software engineering, and they hit a wall. Years of rapid feature-bloat and more recently AI slop code have left the runtime completely unmanageable.
The Anthropic Publicity Stunt: Manufacturing a "God AI"
We all seen what Mythos is capable of doing... right? Yea... Anthropic is excellent at hype I'll give them that.
This rewrite is being heavily pushed as an AI success story. Anthropic is investing massive resources into making Claude (Opus, Mythos) look like an omnipotent developer deity. They need this rewrite to succeed publicly so they can point at Bun and say, "Look, Claude single-handedly fixed a major tech runtime."
But it’s a synthetic flex. Claude is dumping out thousands of lines of Rust slop, and Jared & Co. are merging it directly into the master branch to generate hype, despite it being completely unfit for actual production.
Baiting Rustaceans for free engineering labor
Jared knows exactly what he is doing by merging this messy AI code publicly. He is setting a "trap" for the open-source community. By introducing Rust into the conversation, he has baited two very specific groups:
- Good-faith Rustaceans who just want to help fix bugs.
- Language war nerds who desperately want Rust to "win" against Zig.
The plan is sinister but brilliant: let Claude generate the hype, let Jared take the credit for being a "forward-thinking AI founder", and let the Rust community do the actual heavy lifting of fixing all the memory bugs, compiler errors, and edge cases for free.
> Did you see that? "let Jared take the credit". It reminds me of something... Cof cof Apple and JavaScriptCore.
Because this skill is what seasoned Rust developers have developed. We don't waste our time at work debugging where the heck the array got a new element. We don't waste our time figuring out why the method is undefined. We instead invest our time on ensuring that the safety contracts are upheld. As a Rust developer for embedded systems, that's my job. Doing FFI with random libraries the project needs or reading the datasheet for the microcontroller.
The expanding team at Bun feels less like seasoned systems engineers and more like fresh schoolers/vibecoders who are completely out of their depth. They can't build it, and Claude can't build it safely so they are relying on you to do the real engineering work for them.
Change my mind.
Bunny ORM: Eloquent-inspired ORM for Bun with REPL, migrations, and dynamic tenancy
I’ve been building an Eloquent-inspired ORM for Bun called Bunny. I added a multi-tenant aware implementation because I am using this for a SaaS project of mine using Sveltekit + Bun.
It’s designed specifically for Bun’s native sql client, and it currently supports:
- SQLite, MySQL, and PostgreSQL
- Zero runtime dependencies
- TypeScript-first API
- Chainable query builder
- Schema migrations and CLI
- Model relations, observers, soft deletes, and streaming helpers
- Interactive REPL with bunny repl
- Dynamic multi-tenant connection switching
- Landlord / tenant migration groups
- PostgreSQL schema switching and RLS support
A big focus for me has been making multi-tenant apps easier to reason about. The ORM supports tenant resolution at runtime, so apps can switch connections based on request context, subdomain, or header without hardcoding all tenants in config.
Example:
await TenantContext.run("acme", async () => {
const users = await User.all();
});
You can also put a resolveTenant function in bunny.config.ts and reuse the same config in the CLI and app bootstrap.
I’m sharing it here in case it’s useful to anyone building on Bun, especially if you’ve wanted an ORM that feels more like
Eloquent but is Bun-native.
Repo: https://github.com/bunnykit/orm
Would love feedback on:
- the API shape
- multi-tenant design
- SQLite/MySQL/Postgres support
- anything that feels awkward or missing
Alternatives to Bun now that it is absolute AI slop?
I've been using Bun for my projects for a while now because it's so easy to integrate into NodeJS projects and is incredibly fast and easy. But now that it is AI slop, I feel obligated to switch. Any alternatives?
I would pick Deno but I've noticed it doesn't have the best compatibility with NodeJS. Should I just switch back to NodeJS w/ pnpm or is there some other niche project that isn't AI slop?
EDIT: I recently noticed vlt, but it appears that they are using AI for pull requests as well?
Hot take but there's nothing wrong with the porting of Bun to Rust
Almost a year ago Microsoft released the plan to port TS to Go 1 to 1 and they even used automated tools (even worse than AI if you ask me) but the only difference is that Microsoft handled the pr/announcement much better, doing interviews and doing blog posts before even the code is out in public
But that's not the style Jarred has done ever since he started Bun, he just codes fast and shares things publicly as he goes; that's how Bun got popular to start with, with him sharing his journey in 2021 and ppl starting to follow his progress towards a better node and more unified and faster tool
1- This wasn't a "rewrite" this is just like TS-GO a port 1 to 1 ; you could argue that Zig patterns don't belong into Rust and that could be a fair argument because pretty much the current codebase is Zig written in Rust syntax, there are no new features or anything different about it.
2- Obviously ppl want to hate on Anthropik and their behavior which's understandable; this is probably the most worrying part even tho I trust Jarred and the Bun team you can't seperate them from Anthropik anymore but this port wouldn't be possible without Anthropik ressources (for the better or for the worst)
3- "AI Slop" "Vibe Coded" we kinda need to get past these tbh; like Vibe Coded started as someone who never looked or know how to code and just prompt his way into an app and now anyone that uses agents calls it vibe coding ; and AI Slop is even more egregious cause this is essentially the same Zig codebase so you're just calling the Zig codebase that you're running in production AI Slop when originally the term is about ai generating code from scratch that no one looked at in a giant thousand of lines file
4- Finally, the main reason for the Rust port is to have giant signs in the Rust codebase saying UNSAFE for it to be refactored later on, right now they are not utilizing any of Rust's strengths at all as we said this is just Zig in Rust flavor so if any benefit would come out it's future iterating and spoting Memory issues
I think this hysteria would die down once the canary rust version get more tested and Jarred does couple of interviews and release the blog post to explain the decision; there's nothing that changed about Bun for me, it is still the better node alternative
Why does everyone think the rewrite was safe to merge because it passes test cases?
arent those the same tests that failed to catch the segfaults and mem leaks that forced the rewrite in the first place?
its a line by line translation so as long as that is faithful, it will have all the original bugs, as wel as many more since unsafe in Rust is actually much more unsafe than a bad pointer in zig.
but yeah it will pass the test cases, and so its LGTM I guess....
Bun v1.3.14 might be the last version using Zig
Jared says if the Rust rewrite is completed and merged, Bun v1.3.14 might be the last version of Bun using Zig. Looks like Rust is taking over🦀
Update on Bun Rust experiment (?) 99.8% of bun’s pre-existing test suite passes on Linux x64 glibc in the rust rewrite
Jarred said there will be a blog soon so I wonder how they found the performance and everything
https://x.com/jarredsumner/status/2053047748191232310
And even tho these new tweets seems to be praising Rust; I still doubt they actually go ahead with the rewrite, it's too big of a codebase that a lot of ppl rely on now and too much risk of slop