Live data from Hacker News

How is the Bun rewrite in Rust going?

lockwood.dev

131–140 of 412 posts

Re: How is the Bun rewrite in Rust going?

#131

I'm not sure Anthropic even cares about "releasing" the next version. The rust one has been in use in Claude Code for more than a month now, used by millions of people, and that's as far as they probably really worry about it. They bought Bun for Claude Code and I doubt the open source project matters to them otherwise.

If that is really what they are concerned with, they probably could have just had Claude Code rewrite Claude Code in rust? That likely would be far more efficient than changing the language of your typescript runtime that ships to run your react-based CLI app. I imagine the $800k or whatever this has cost is coming out of Anthropic's marketing budget, so they can make a big splash about it.

> If that is really what they are concerned with, they probably could have just had Claude Code rewrite Claude Code in rust

Rewriting a runtime with well-defined interfaces and behavior is quite different from rewriting a user-facing application under active development by a decent chunk of their organization.

Re: How is the Bun rewrite in Rust going?

#132

Earlier quoted context omitted.

I feel your estimate of tokens is a few orders of magnitude off, it’s on the low side. I use more (albeit cached) when centering a div.

This is where we've come to where people proudly proclaim using an AI to do what is a single line of CSS.

"centering div" is a classic problem (/trauma/meme) that sounds trivial but had no universal solution (until 2017?).

Re: How is the Bun rewrite in Rust going?

#133
post #7

This post doesn’t make sense. It was rewritten in Rust. The rewrite itself is complete (no more Zig). Various people have claimed that Bun in Zig had a lot of tech debt. If they’re to be believed, it seems natural to assume the rewrite does, too. Perhaps all this activity is paying down some of that debt.

> Various people have claimed that Bun in Zig had a lot of tech debt. If they’re to be believed,

This is one of the funnier takes on the rewrite. Bun was held up as a flagship Zig project for years. Then they chose to rewrite in Rust and everyone up to the Zig author has suddenly switched to claiming that Bun was terrible code all along.

Re: How is the Bun rewrite in Rust going?

#134

I really do not understand how software developer think anymore. Using a LLM to translate a project in a short time, is by itself incredible. Just like one-shot whatever office clone. But what makes software is not the fast creation of a "product" but that actual development of its features. Figuring out how everything needs to work together, fixing the bugs, and the o so boring UI work. I have used LLMs to create st…

Also I think porting code to another language or rewriting is one of the easier tasks for an LLM, since it has an extremely detailed spec (the source code itself) and a ton of tests already (hopefully).

In my experience, it will go to every length to convince you it has ported code that it hasn't. It will silently drop upstream unit tests it has no code for, if questioned it will insert some markdown giving some rational why that specific bit was deferred, after the fact, and then point you to it. This was Opus 4.6 for reference. I have had much better luck with small numbers of higher level tests that I can individually verify equivalency. I haven't tried having it do differential fuzzing on some high level interface, that seems like it might work in some cases. But to summarize, treat it like an adversary trying to deceive you.

Re: How is the Bun rewrite in Rust going?

#135
post #26

Earlier quoted context omitted.

They also have made a release, in a sense, since they moved all Claude code users to it a month ago. (And apparently no one noticed). I think they're taking things "gradually" as they are under a lot of scrutiny and no rush for full release.

Claude Code has a huge userbase. This is an impressive result so soon after the rewrite. This is an impressive milestone for their rewrite. There are a lot of comments trying to downplay this as being unimpressive for some reason, but I can’t see them as anything other than sour grapes because the rewrite hasn’t crashed and burned like they were hoping.

It's just blind AI hate for no rhyme or reason. I've ported projects from one language to the next using Claude Code long before Bun even did this, it's very trivial for an LLM. In the case of Bun though, they have a test suite to run the entire codebase against, and so long as all of those tests pass, there's and drastically more likely chance that its correct.

Re: How is the Bun rewrite in Rust going?

#136
post #90

I really do not understand how software developer think anymore. Using a LLM to translate a project in a short time, is by itself incredible. Just like one-shot whatever office clone. But what makes software is not the fast creation of a "product" but that actual development of its features. Figuring out how everything needs to work together, fixing the bugs, and the o so boring UI work. I have used LLMs to create st…

I think this is perfectly fine. If you explore Github, you're gonna see thousands of abandoned game engines, compilers for made-up languages. And that has been happening since before the LLM era. I used to be part of an OS messaging board in the early 2000s and almost everyone had their own OS. A dozen people or so could even run Firefox! I remember (now legend) Terry bothering us to check out LoseThos or GodOS or wh…

> (now legend) Terry bothering us to check out LoseThos or GodOS or whatever was its name

Temple OS :)

Re: How is the Bun rewrite in Rust going?

#137
post #26

Earlier quoted context omitted.

They also have made a release, in a sense, since they moved all Claude code users to it a month ago. (And apparently no one noticed). I think they're taking things "gradually" as they are under a lot of scrutiny and no rush for full release.

Claude Code most likely only uses a tiny fraction of Bun/Node features, so Claude Code switching to the Rust rewrite doesn't mean all that much.

[deleted]

Re: How is the Bun rewrite in Rust going?

#138
post #107

Earlier quoted context omitted.

It's the equivalent of porting Unreal Engine 5 to another language and then using it exclusively to run a 2D Tetris clone. Let's wait for the next Bun release when more real-world code is hammering it before declaring victory. (also, fwiw, a manual rewrite would be under the same scrunity and suffer from the same skepticism, at least when obviously rushed).

If you ported UE5 to, idfk, Malbolge and ran Tetris on it and someone would dismiss it as “not impressive”, I would think they lost the plot too!

You just compared Rust to Malbolge :)

Re: How is the Bun rewrite in Rust going?

#139

Many repeat the point of “$165k is cheaper than team of multiple engineers working on the rewrite for a year”, which I think is flawed — the team of engineers would have produced idiomatic rust, and it would take probably 100k+ of tokens more to make the bun in rust idiomatic rust.

They also would have produced a team of engineers that knows the Rust codebase.

This is assuming your engineers don't leave for higher-paying roles elsewhere. The market might be cold generally but for engineers working at these frontier AI companies it's red-hot.

And most executives are figuring this into their calculus right now because they were burned badly during COVID. Meta, Google, etc were loose with hiring and engineers flocked from their lower-paying companies in droves. The brain drain was real.

One public company I was at lost nearly 2/3rds of their engineers and mostly to Meta (granted, they had other problems but it was mostly about money -- the offers were excessive). Then market conditions forced them to freeze hiring and they've had a slow exodus of senior talent since as the firefighting has become constant.

AI adoption has only accelerated problems for them.

We've taken this "only two years and then leave" philosophy to an extreme and now companies are totally justified in not investing in their engineers anymore.

Re: How is the Bun rewrite in Rust going?

#140
post #26

Earlier quoted context omitted.

They also have made a release, in a sense, since they moved all Claude code users to it a month ago. (And apparently no one noticed). I think they're taking things "gradually" as they are under a lot of scrutiny and no rush for full release.

Claude Code most likely only uses a tiny fraction of Bun/Node features, so Claude Code switching to the Rust rewrite doesn't mean all that much.

A bigger factor is that Claude Code is owned by Anthropic. They can view issues in the combined CC+Bun as issues in one overall thing that they own. They can reproduce and test them and "Claude Code works" can be used as a target for agentic iteration on Bun.

To release this to the world and not have it be a catastrophe, they need to have confidence that Bun itself satisfies the promises that it has made, both explicitly and implicitly (bearing in mind Hyrum's law!) to all those projects out there using it, none of which are owned by Anthropic and many of which are not source visible to them. It's a much, much higher bar.

Post reply on HN