Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

41–50 of 920 posts

Re: Claude Code uses Bun written in Rust now

#41
post #12
post #10

Earlier quoted context omitted.

I am impartial on the matter, but I think one of the reasons Bun became a thing in the first place was because of Zig attracted a small but very active developer community. Switching from Zig to Rust effectively alienates that community.

I think the Zig people are really just worried that maybe Zig itself is a DOA language before it has even reached 1.0 because it doesn't offer enough over C for any serious use and their flagship project has now abandoned it.

Anyone actually using it knows it is better. The C interop is so good that there is no use-case where C is the better option IMHO

Re: Claude Code uses Bun written in Rust now

#42
post #35

Earlier quoted context omitted.

My personal feelings about the matter is that having an LLM rewrite the entire thing as an experiment and then just going with it a few weeks later kills any incentive for a community to build up around it. It's a clear signal that every basic aspect of the runtime can change on a whim. I don't care about meh Zig being rewritten to bad Rust if it does the same thing, but taking what is presented as" look at this funn…

Which community specifically though? The overwhelming “user” community would be web developers and people writing JS/TS, right? Not zig/rust developers.

There were very many open pull requests from the community that were all invalidated overnight for something that same community was assured was merely an experiment.

The normal process would be "hey, this experiment is going well, we've made this plan, come help us shake out the new codebase for the switchover in X time." None of that happened. There wasn't even an announcement, just a silent commit that trashed hard work from hundreds of community members.

Re: Claude Code uses Bun written in Rust now

#43
post #35

Earlier quoted context omitted.

My personal feelings about the matter is that having an LLM rewrite the entire thing as an experiment and then just going with it a few weeks later kills any incentive for a community to build up around it. It's a clear signal that every basic aspect of the runtime can change on a whim. I don't care about meh Zig being rewritten to bad Rust if it does the same thing, but taking what is presented as" look at this funn…

Which community specifically though? The overwhelming “user” community would be web developers and people writing JS/TS, right? Not zig/rust developers.

Developer community. "Open source" historically implied that an interested developer might hack on the code and submit their changes. But if the entire code-base is rewritten by the maintainer every year, then there's no developer community.

Re: Claude Code uses Bun written in Rust now

#44
post #29

Damn, I should have not migrated to Bun. Should I revert back to Npm?

I am getting into the frontend dev and one thing that I don't understand is why people use bun in the first place? It's not much better preforming, it's not much safer, it's still not 100% compliant. Some tests show it's actually slower than node. Why bother switching, then?

Re: Claude Code uses Bun written in Rust now

#45
post #9

Honestly, 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…

We are the ones to get to decide. Do we want that? I don’t. But im just a single data point

Re: Claude Code uses Bun written in Rust now

#46
post #19

> 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.

It was already written in a very performant language so no significant performance improvements should be expected.

The benefit of a rust rewrite is memory safety improvements, but currently they've just rewritten zig to unsafe rust so they don't have that either yet

Re: Claude Code uses Bun written in Rust now

#47
post #30

Earlier quoted context omitted.

[flagged]

From the article: > 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. Which is still true as I write this comment.

A charitable interpretation is that the version of bun inside Claude Code corresponds to some recent state of their public git repository, so if you clone that, you more or less get the same thing.

I don't see what it would buy Anthropic to have some sort of secret internal fork with special private code in it.

Re: Claude Code uses Bun written in Rust now

#48
post #27

Earlier quoted context omitted.

I don't care about the language, but pre-releases the community don't get access to but released (Anthropic) applications do have access to, feels a bit too on the nose after the acquisition.

The whole point of the outrage was that 1.4 was merged into main. Publicly. So I’m not sure what you mean. Everything is in the open: PR #30412

That PR is the rust rewrite. That's some time in the past now. As of this comment, there is no tagged 1.4 release. This is the present. Anthropic is using apparently a version of Bun that is not publicly available. This is orthogonal to it being Rust-based, as all Bun releases now will be.

Re: Claude Code uses Bun written in Rust now

#50
post #9

Honestly, 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…

That sounds like a massive waste of finite energy and compute resources.
Post reply on HN