Claude Code uses Bun written in Rust now
- mrothroc - 72616 sekunder sedanDrilling into the original article where Jarred explained the reasoning behind the change, It's pretty clear that under zig the team was doing things by hand that are automatic in rust.
Humans and agents share one thing: they are both non-deterministic. He talks about the issue of tracking memory lifecycles manually in zig so it can be explicitly freed. As expected, this leads to a long list of bugs where people missed things.
Rust does this automatically. It removes an entire class of errors from his backlog. From an engineering management perspective, this looks like a pretty good trade.
The bonus here is that compiler errors are exactly the kind of deterministic guardrail you need to put around coding agents. Claude works really well if you give it a way to test for correctness and "make it compile" is a pretty good target.
There's a general version of this: the artifact you expose plus the test you run on it. Deterministic tests turn stochastic output into a hard guarantee. Wrote it up here if useful: https://michael.roth.rocks/blog/verification-surface/
- gabrieledarrigo - 98823 sekunder sedanBah.
Personally my take on the entire affair is quite negative, whatever Jarred or Simonw says about it.
I think Bun owned by Anthropic and the entire rewrite with AI is not the real point (even if it's quite interesting, though).
My take is that Jarred, and Bun,didn't demonstrate a serious, adult approach, from "this is my branch, you are overreacting" message to just proceeding with a 1mil+ PR merged in less than month.
The communication is the issue, and it was handled very badly, in a way that impacted trust and divisions.
Was it so difficult to adopt the approach that the TS team adopted for 7.0?
- embedding-shape - 99808 sekunder sedan> For me this outputs Bun v1.4.0 (macOS arm64). The most recent release of Bun on GitHub is currently v1.3.14 from May 12th, so that v1.4.0 version number in Claude supports them shipping a preview of a not-yet-released Bun version.
And so, the FOSS project "Bun" silently dies in darkness and is now something completely else. I'm glad I still had "Investigate if Bun is worth it" on my TODO list and hadn't yet gotten to it.
What is the governance structure for Bun by the way? Couldn't find any documents/explanations about how it's supposed to work. I'm guessing it's essentially just "Anthropic decides what gets done and accepted" today?
- weakfish - 84333 sekunder sedanMaybe I’m taking crazy pills, but I’m still stuck on “why the hell does a TUI need to run in terminal React by way of JavaScript”
The fact that Anthropic felt the need to buy a runtime so they could make their TUI better speaks more to the quality of engineering than anything else IMO.
If rewrites are so easy, why not rewrite CC in a native language? Would’ve been a hell of a lot cheaper.
- GuB-42 - 84838 sekunder sedanWhy all the mess with Bun?
Couldn't they have rewritten Claude Code in Rust directly? No more need for a JS runtime, better performance, etc... If their agents can do Zig to Rust, why not JS to Rust?
- nirui - 92883 sekunder sedanAll the emotion of speculations aside, how it runs? It boots faster yeah, but what about RAM and CPU usage? Weird dead loop or dead locks?
If it run as good as before or even better, then that's kinda impressive.
I'm a developer so I really don't like it when AI might took my job, but if everyone on this planet could create a software for themselves exactly as how they wanted with just a few simple demands, that will change the world for the better.
Think of it as a democratization of technology. You don't want Microsoft stealing your data? Just ask a AI to write an OS for you. You don't want Google to listen to what you're saying? Just ask a AI to design a phone for you. If one day the AI ended up doing that, it will be the ultimate technology self-sufficient. In front of that, your job security is insignificant.
It is also why keeping the tech open source is that much important. Otherwise, it's still the same old shit again and again, and, you lose your job too.
- harrisi - 62248 sekunder sedanMaybe I'm taking crazy pills, but I swore there have been very similar comments I've seen as the current top post by weakfish:
> Maybe I’m taking crazy pills, but I’m still stuck on “why the hell does a TUI need to run in terminal React by way of JavaScript”
> The fact that Anthropic felt the need to buy a runtime so they could make their TUI better speaks more to the quality of engineering than anything else IMO.
> If rewrites are so easy, why not rewrite CC in a native language? Would’ve been a hell of a lot cheaper.
It turns out, there's some similar sentiments in the last year ish:
https://news.ycombinator.com/item?id=47043325
https://news.ycombinator.com/item?id=47105720
https://news.ycombinator.com/item?id=48001113
https://news.ycombinator.com/item?id=46134570
https://news.ycombinator.com/item?id=46124596
I'm not a fan of any of the technologies, companies, or people related to this. I just couldn't shake the feeling that I've seen similar comments.
September and all.
- overgard - 6668 sekunder sedanOh good, the vibe coded prompt injection vector that casually accesses things in my home directory without permission is running on a vibe coded prerelease runtime using lots unsafe rust. What could go wrong?
- - 11119 sekunder sedan
- Aeveus - 89960 sekunder sedanAnecdotal, but I’ve been getting segfaults in Claude Code. I run inside Kitty tabs, and the entire tab becomes unusable when this happens. No response to inputs at all from that point.
When this happens, a link shows up to report the issue. It’s not clickable (likely due to the segfault), and perhaps more important: it’s encoded, so you can’t see what you would be sending in your report.
Hope it gets better.
- feverzsj - 96877 sekunder sedanIt's a transpile. And not even a good one. The generated code is far from idiomatic rust. Some may consider it an abomination.
- codethief - 95303 sekunder sedanIncidentally, Claude Code has been very buggy for me lately (much more so than before). Lots of TUI rendering issues causing, e.g., the conversation history to be garbled etc.
- jgbuddy - 39124 sekunder sedanWhy even write Claude code in JavaScript at that point, assuming they write the application logic in node and also include the interpreter in the application?
- softwaredoug - 93049 sekunder sedanWhatever the headaches of the internals, I haven’t heard any substantive outcomes in hacker news that have been impacted by this change.
Yes if we had a Zig->Rust transpiler maybe it would produce similar output. But I can’t find one. We’d have to use an agent to build one first :)
- luciana1u - 73527 sekunder sedana terminal app now has a supply chain long enough to include a runtime acquisition. somewhere between "rewrote it in Rust" and "ship it" someone said "or we could just buy the company"
- bel8 - 98699 sekunder sedanContrary to many, I have high hopes that Jarred and team will lapidate the ported codebase and it will continue to flourish as an open source project.
- aureate - 96793 sekunder sedanThe port of Bun, which has >5000 open github issues, is used in Claude Code, which has >11000 open github issues. Do people use Bun in things that are expected to work reliably? Have any such projects tried the upgrade yet?
- foldr - 7520 sekunder sedanIs anyone else failing to understand all the internet drama surrounding this?
The rewrite may work out on a technical level or it may not. Let's wait and see. The Bun project did not swear a blood oath to use Zig forever, and it's ultimately their choice to switch to a different programming language.
Beyond that, people seem to be incredibly emotionally involved with this, for reasons that entirely escape me.
- steveiliop56 - 67024 sekunder sedanAh so that's why it has been crashing constantly for me.
- arikrahman - 29313 sekunder sedanWhy not just use Deno that's made in Rust and also has safety in mind?
- Saba-Ba - 14562 sekunder sedanIt was an intersting case. Watched a youtube video about this and discussion from zig founder and bun was a little weird.
- the_black_hand - 33830 sekunder sedanI'm stupid and clearly too stupid to google too. Is bun simply a better nodejs? Assuming it true that all of Claude code is now written by AI, why would AI care about using bun over node?
- rekttrader - 68572 sekunder sedanThey’re just wildly successful terrible engineers who can describe problems well and have unlimited token budgets. If they were paying for their own token use, the software would be better, they simply don’t have financial incentive to be more performant.
A dirty secret of AI data centers are that they’re only getting 40-60% efficiency out of their GPU clusters and because the moneygun go brrrrr they just buy more.
You wonder why they’re so afraid of the Chinese competition… they can’t afford to be as wasteful
- - 96728 sekunder sedan
- witx - 95530 sekunder sedanWhat is the actual contribution and motivation of this post?
- lykahb - 72629 sekunder sedanIs it easier to rewrite Bun than it is to rewrite Claude?
- reddalo - 98200 sekunder sedanDamn, I should have not migrated to Bun. Should I revert back to Npm?
- preommr - 82757 sekunder sedanI love bun - although disliked how Jarred did the conversion.
Project-wise, nothing has changed.
Bun was always great because of the fantastic dx - it was just really easy to use , with stuff like out of the box typescript (unreal that it took so long for node, and it's behind a super long flag, wtf...). And it didnt have the weirdness of deno, it maintained backwards compatability with node api, and it just worked.
But it was never stable. You'd have to be fool to believe that a single project could stably do everything bun covers. It's always been an insane project. It was built on top of zig, a langauge that hasn't reached 1.0, and is constantly changing, and throw in how he was rewriting his own custom zig stuff. Like c'mon, let's apply some common sense here.
For me, little has changed. I am still going to use bun as a nice dev tool, and use node for production.
- - 94810 sekunder sedan
- - 54760 sekunder sedan
- - 97878 sekunder sedan
- effnorwood - 54935 sekunder sedanMy perl re-write is not very good.
- tappaseater - 95111 sekunder sedanAnthropic bought Bun, so they kinda, sorta had to make this work. I am sure the cost at $145,000 in Claude time will get some attention.
I am curious how this will work going forward from FOSS perspective. Will humans be allowed to modify the generated code? Only the .md prompts for the agents? Or what?
- 512colors - 38246 sekunder sedanyou know what i hate? i hate that each update, to codex or claude code, it seems like they're always trying to "hide stuff" , reminds me of the 80s and 90s when tech assumes normal people are too stupid to see 'raw' stuff like terminal commands being run, its always been like that, less so now, but i get so mad when its doing stuff, and i can't see if its deleting files or just screwing something up. btw this is totally free tool buttonscli.com that is a full UI terminal app but its got a button for agent control. You click that, paste into claude code or w/e/any agent, and it'll use that for the terminal commands instead of the built in one so you can see everything (and it can open 10 tabs if it wants, you see them all)
- baq - 99767 sekunder sedanTurns out it was just a build step after all.
- nottorp - 94096 sekunder sedanSo does that make Claude Code any better?
Can you select text with shift + arrow keys now in the command line client? :)
- forrestthewoods - 56767 sekunder sedanIt’s interesting that Bun was a human rewrite from Go to Zig. (I think?). Then rewritten from Zig to Rust.
AI is pretty good at rewrites and ports. Quite good infact.
- LAC-Tech - 57341 sekunder sedanHas all of this drama turned anyone else a bit sour on bun?
I have a long running side project I migrated to bun, and I'm starting to regret it. I don't want to build on top of this much churn.
- jason_s - 73385 sekunder sedanTIL about Bun.
- hmokiguess - 81160 sekunder sedanpi runs in TypeScript and I like it, the target language of the tool, for me, matters only such that I can extend it. I like writing extensions, plugins, things, in TypeScript so I'm cool with that!
Claude Code is closed source, doesn't let me extend it beyond hooks, and these I write in bash anyways.
That all said, why should I bother about this change? Feels like a nothing burger to me, as an end user. This should matter more for those that are internal to Claude Code and Bun developing it.
- 23951276 - 68894 sekunder sedanBasically Anthropic can ship any trojan in underhanded Rust to any target because it is not possible to audit 1M lines of slop.
And the crowd is cheering.
- throwatdem12311 - 78105 sekunder sedanI despise this era we live in. Pushing rewrites like this upon millions of users, when the Bun rewrite has countless known issues and is likely a security nightmare. Every time I ‘brew outdated’ and I see a wall of updates I die a little inside knowing that most of this code has not been verified or even looked at. Yet we hear about massive supply chain attacks pretty much every week now and we’re still full steam ahead on this vibe coded nightmare. God help us. Claude Code in particular updates sometimes multiple times per day. Like I’m sorry but there is no way all this nonsense is safe.
- rs_rs_rs_rs_rs - 97030 sekunder sedanIt is absolutely amazing to me that this ai rewrite work so well, maybe claude is not really that much of a complicated tool to stress the bun runtime but still...
- IshKebab - 97854 sekunder sedanThis post is just "they didn't lie"...
- Debo_Jolaosho - 57674 sekunder sedanFor real
- ooofydoofy - 98502 sekunder sedanbun upgrade --canary
you are welcome
- thrance - 97715 sekunder sedanYeah, I noticed. I had Claude write a quick JS script for me a few days ago, it then tried to use Bun to run it. When it couldn't find it, it tried to install it with `sudo pacman`. I had to fucking tell it to use Node instead.
- zuzululu - 75363 sekunder sedanas it always should've been Rust was the right move
- globalnode - 39299 sekunder sedanat this point im declaring any "rewritten in X" articles as trolling lol.
- feiz45607 - 9646 sekunder sedan[flagged]
- m_bashirzadeh - 25095 sekunder sedan[flagged]
- skumar5190 - 18656 sekunder sedan[flagged]
- Unified-Mentor - 5584 sekunder sedan[dead]
- kburman - 99194 sekunder sedanHonestly, I initially thought rewriting an entire codebase with AI would be a huge mistake. After reading this, I'm starting to think I was wrong.
If projects like Bun can be substantially rewritten and shipped to millions of users, it suggests we're entering a very different phase of software development.
Today's AI-generated rewrites may not produce code that humans would consider high quality or maintainable. But I'm beginning to wonder whether that will even matter in a few months. If AI is the primary consumer, maintainer, and refactorer of code, human readability becomes far less important than correctness, performance, and the ability to iterate.
This feels like a shift where software may no longer exist as a long-lived artifact in its current form. Instead of writing and maintaining applications for years, we may generate, adapt, and discard them continuously for each use case.
- NodesHub - 34778 sekunder sedan[flagged]
- molmos - 62187 sekunder sedan[flagged]
- hkclawrence - 91708 sekunder sedan[dead]
- luciana1u - 96892 sekunder sedan[dead]
- marsven_422 - 79346 sekunder sedan[dead]
- marsven_422 - 97783 sekunder sedan[dead]
- dranan - 67293 sekunder sedan[flagged]
- lazzlazzlazz - 94273 sekunder sedan[flagged]
- znpy - 98525 sekunder sedan> Startup got 10% faster on Linux but otherwise, barely anyone noticed.
Just that?
I was expecting more from that rewrite. Maybe Rust is not so worth it after all.
- larodi - 73773 sekunder sedanOk, so let me wrap this for everyone:
While everyone here in this forum kept arguing (and fighting and yelling at each other) whether tis moral/right/secure/cheap for ppl to rewrite and ship a major software package with LLMs/agents, one of the main drivers behind AI actually did it, without consulting your opinion, and most same everyone actually slurped this decision without paying a a notice.
Boring is good, but this boring is super massive major thing that happened, and precisely because security is still intact.
- roundabout-host - 85343 sekunder sedanI have a better idea: convert it to a prompt and commit the prompt to the repository. Then Mythos will be your compiler.
- maverickaayush - 97200 sekunder sedanI've been using Claude Code daily for a fairly large FastAPI project and didn't notice anything unusual around that timeframe. If this really was the Rust runtime underneath, "boring is good" seems like the right outcome.
- delegate - 79220 sekunder sedanI'm looking at this situation strictly as 'What's possible today'. If a 1M lines code rewrite from one language to another goes into production in 1 month, that's a very strong signal that the models are now insanely capable.
My anxiety before merging a 2K lines PR is greatly reduced after 3 frontier models (Fable, 5.6 and kimi K3) finds no issues in it.
Just 6 months ago (Opus 4.6) this was not true, a big PR would have countless number of issues.
Aside from the human drama, the message to all of us is - these things are ready for whatever your imagination can throw at them.
I think that's exactly what Anthropic wanted to communicate.
- psyclobe - 30533 sekunder sedan[flagged]
- silverlemontea - 6753 sekunder sedanEveryone associated with "Claude" "Rust" or "Bun" is an idiot.
Any time I see any of those words "Kagi" too I immediately ignore whatever they're trying to sell.
Nobody ever believed these people were creative technologists. Anyone who uses any of these buzzwords is a hack.
Real LLMs are ran locally on real computers (not in data centers optimizing for cost).
Real software is written in C++ and JavaScript.
The browser is Chrome, until someone does something better.
I don't make the rules.
Nördnytt! 🤓