Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

281–290 of 920 posts

Re: Claude Code uses Bun written in Rust now

#281
post #183
post #148

Earlier quoted context omitted.

The motivation is obviously clear. No-one would be doing that for fun 24/7, only covering about AI and nothing else without getting paid for it. If anyone else did that on HN, they would be accused of slop with their domain blacklisted.

"only covering AI" - don't miss my wildlife photography! https://simonwillison.net/elsewhere/sighting/ (Unless photos of actual pelicans count as "AI" content now.) I just shipped this filter UI so you can see my other non-AI-tagged content in one place: https://simonwillison.net/search/?exclude.tag=ai

> "only covering AI" - don't miss my wildlife photography!

The "ai" tagged posts (2,100+) significantly outnumber "sighting" posts by orders of magnitude. Even searching HN, this post is the very first mention of it.

Perhaps that is why everyone here (except you) overlooks that or why we don't see much more of those sightings posts here either.

Re: Claude Code uses Bun written in Rust now

#282
post #261
post #53

Earlier quoted context omitted.

The code is on GitHub in the "main" branch, it's only unreleased in that it hasn't been tagged with a version number yet.

If it hasn't been tagged with a version yet, how do you know (or what makes you think) it's the same as this 'v1.4'?

I don't know for certain, but it seems likely that it is given that Jarred said "Claude Code v2.1.181 (released June 17th) and later use the Rust port of Bun".

What motive could he have for secretly maintaining a private fork of Bun that's shipped with Claude Code while simultaneously working on the open source repairs every day?

Re: Claude Code uses Bun written in Rust now

#283

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.

I'm confused as well, could someone who knows how TUIs work explain what's the point of React-style diffing in this context? I thought you need to clean and full redraw if anything changs anyways?

Re: Claude Code uses Bun written in Rust now

#284
post #236

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 largely works and it's a massive business success. This is the classic engineer asking the 'why this technology?' to what amounts to a business question. They chose it early on, it works, and it makes obscene amounts of revenue. End of story. That doesn't mean it was the "greatest" choice, or has a perfect technical architecture. Rewrites are never easy, even the bun rewrite. But a non-UI developer tool with a rig…

> “It largely works”

A ringing endorsement!

Re: Claude Code uses Bun written in Rust now

#285

Earlier quoted context omitted.

So, you have a vibe-coded TUI which happens to work, and then, as a workaround you vibe-translate its engine to make it more performant. Where does that leave you ? Basically, fully dependent on AI to fix whatever breaks. Workaround on a workaround is the way I see it, and it aligns with the AI design mentality in general. For a variety of usecases, this might still be a win in terms of overall cost. But, for softwar…

That does seem to be the way many use it. I'd be very surprised if they didn't have to insert a rule to prevent opus from constantly asking why they didn't just use ncurses. I just asked sonnet for design options for a tui to onteract with llms to perform sw dev tasks. After describing the tui it immediately suggested ratatui and crossterm as the tech stack. I feel like they must have ignored even the advice of their…

They decided on the tech stack for Claude Code over a year and a half ago.

Re: Claude Code uses Bun written in Rust now

#287

I'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…

It was not really a traditional rewrite. More like transpilation. Still impressive

Re: Claude Code uses Bun written in Rust now

#288
post #271

Earlier quoted context omitted.

I think you're missing group 3, which is the "assume bad faith and/or bad outcome from any possible change to anything, and especially changes to open source projects that can be interpreted as exogenous, e.g. from an acquirer, and especially if that acquirer is a gigantic commercial entity." There are not nearly enough disenfranchised Bun-on-Zig contributors to make a dent in this conversation. There are lots of Gro…

I think most of the naysayers are in group 3 because there’s a lot of anger but never a single link to a blog post or analysis done by anyone to demonstrate a regression. not one. There are some that analyzed the quality of the initial rust code and use of unsafe but Claude has been chewing through those as I understand.

I thought that too but it looks like the usage of unsafe hasn't been trending down over time: https://news.ycombinator.com/item?id=48966569#48967630

Re: Claude Code uses Bun written in Rust now

#289

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.

I'm confused as well, could someone who knows how TUIs work explain what's the point of React-style diffing in this context? I thought you need to clean and full redraw if anything changs anyways?

Ncurses is how people used to do it.

Re: Claude Code uses Bun written in Rust now

#290

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.

JavaScript is dynamic and supports live reload which means iterations are far faster than would be in a compiled language--even for LLMs.

This is especially useful when you're trying to evaluate behaviors while changing state surgically.

Post reply on HN