Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

871–880 of 920 posts

Re: Claude Code uses Bun written in Rust now

#871
post #12

Earlier quoted context omitted.

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.

Zig is a DOA language for other reasons though. The reason why Rust enthusiasts act so morally superior is because they are: > Rob Pike, an unsafe guy, may insist that a small language and garbage collection are enough. But the typesafe visionary Grzegorz Wielbodłąński understands the deeper truth: every invalid state permitted by a compiler is a tiny act of civilizational sabotage. https://x.com/typememetics/status/…

Based.

Re: Claude Code uses Bun written in Rust now

#872
post #845

Earlier quoted context omitted.

Bun isn't Bun, it's a (notionally) trillion dollar AI company famous for ruthlessness and engineering controversy for marketing purposes. Zig just happens to be a language led by someone with an AI-skeptic philosophy. Are you saying I should just believe that their strategically deniable negative insinuations about Zig are not bad faith? Sorry, but I'm calling bullshit. I know there's no absolute smoking gun here, bu…

The simplest explanation is that the Bun team decided to try rewriting Bun in Rust because they had some frustrations with Zig. I haven't seen any evidence that there's more to it than that. It's easy to get sucked into all the internet drama, but that only exists because Zig's author lost his cool and wrote a salty blog post, not because of any conniving on Athropic's part.

I agree that that's the surface-level, superficial, zero-thinking description of what happened.

Re: Claude Code uses Bun written in Rust now

#873
post #98

What is the actual contribution and motivation of this post?

[flagged]

Please don't attack people on HN, even with vague insinuations. The guidelines ask:

Please don't post insinuations about astroturfing, shilling, brigading, foreign agents, and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email hn@ycombinator.com and we'll look at the data.

https://news.ycombinator.com/newsguidelines.html

Re: Claude Code uses Bun written in Rust now

#874

Earlier quoted context omitted.

> In short, if you use an unsafe block, then potentially any part of your code is unsafe. The way I think about it is that the unsafe keyword is a promise that you’re going to maintain the safety invariants yourself, manually. The program is memory correct if it correctly maintains a certain set of invariants. Unsafe punts responsibility over those invariants to the programmer. If you use unsafe and mess up, the prog…

> But the bug is still almost always in an unsafe block. That's entirely dependent on how you write your Rust code. If you're derefing an invalid pointer then the bug is usually in how you calculated that pointer value, but the only part that actually requires 'unsafe' is the deref, not the bugged pointer calculation. Now in properly written Rust code you should be marking all of that code as 'unsafe' in that case an…

I think this point gets missed too often in the face of technical things the Rust compiler does.

There was a world where everyone just used the unsafe keyword everywhere, and Rust code crashed & had memory issues all the time.

The big thing Rust did wasn't invent borrow checking or memory safety; it's the ease of use, the defaults, and the social aspect of "if unsafe is used, a memory bug is in the unsafe part".

Re: Claude Code uses Bun written in Rust now

#875
post #845

Earlier quoted context omitted.

The simplest explanation is that the Bun team decided to try rewriting Bun in Rust because they had some frustrations with Zig. I haven't seen any evidence that there's more to it than that. It's easy to get sucked into all the internet drama, but that only exists because Zig's author lost his cool and wrote a salty blog post, not because of any conniving on Athropic's part.

I agree that that's the surface-level, superficial, zero-thinking description of what happened.

You're right that I haven't spent much time thinking about why a project that I'm not involved with, and that is of only moderate general importance, has decided to switch from one programming language to another. Anyone who's convinced themselves that this is all part of some elaborate scheme is almost certainly overthinking it.

Re: Claude Code uses Bun written in Rust now

#876

Earlier quoted context omitted.

Saying Bun's communication was an issue here is clutching pearls. There is no evidence that Bun ever acted in bad faith, Jared definitely seemed to initally think it was just a trial, until he realized that it was actually something feasible. He isn't clairvoyant; there is no way he would have known it was going to be successful when he initially made the post.

Bun isn't Bun, it's a (notionally) trillion dollar AI company famous for ruthlessness and engineering controversy for marketing purposes. Zig just happens to be a language led by someone with an AI-skeptic philosophy. Are you saying I should just believe that their strategically deniable negative insinuations about Zig are not bad faith? Sorry, but I'm calling bullshit. I know there's no absolute smoking gun here, bu…

>I know there's no absolute smoking gun here

Wow, so you can't even find circumferential evidence of circumferential evidence? I guess you can believe whatever you want, evidence be damned

Re: Claude Code uses Bun written in Rust now

#877

Earlier quoted context omitted.

> In short, if you use an unsafe block, then potentially any part of your code is unsafe. The way I think about it is that the unsafe keyword is a promise that you’re going to maintain the safety invariants yourself, manually. The program is memory correct if it correctly maintains a certain set of invariants. Unsafe punts responsibility over those invariants to the programmer. If you use unsafe and mess up, the prog…

> But the bug is still almost always in an unsafe block. That's entirely dependent on how you write your Rust code. If you're derefing an invalid pointer then the bug is usually in how you calculated that pointer value, but the only part that actually requires 'unsafe' is the deref, not the bugged pointer calculation. Now in properly written Rust code you should be marking all of that code as 'unsafe' in that case an…

> The only part the compiler actually enforces is that you mark the specific spots where you make use of the operations that 'unsafe' allows.

Yes, I wish there was a way to mark code as unsafe without also allowing unsafe operations. Its quite common I have some "safe" code that generates values which are eventually used in an unsafe block. If the "safe" code is wrong, my unsafe code will fail in memory-unsafe ways. But there's currently no way to annotate this sort of "safe" code. Rust provides the unsafe keyword - but that keyword is generally reserved for code which needs to actually make unsafe operations (like derefing pointers or calling other unsafe functions).

Re: Claude Code uses Bun written in Rust now

#878
post #731

Earlier quoted context omitted.

Plus 1) There's much more reusable open source code written in Rust than in Zig 2) There are more Rust developers than Zig developers.

I don't think there being more rust developers should matter if we're talking about a company that solved coding.

It does, mostly because there is more recent rust in the training corpus. Rust that is almost entirely available under permissive licenses

Re: Claude Code uses Bun written in Rust now

#879

Earlier quoted context omitted.

A lot of hypotheticals, conjecture, speculation, personal feels devoid of any facts. That somehow kills the project. ok!

> A lot of hypotheticals, conjecture, speculation, personal feels devoid of any facts. No,not really. There is only one point: does Bun acknowledge that past contributors still hold copyright over the Rust rewrite?

Is there any precedent of rewriting a software, let alone in another language, retaining copyright by past contributors?

And this contribute to oss voluntarily but hold copyright and use it as some sort of leverage is bullshit, in my opinion. Don't contribute to someone else's project if your concern is copyright.

Re: Claude Code uses Bun written in Rust now

#880
post #870

Earlier quoted context omitted.

Discussion was not interesting. It was built on speculation as facts and lies as facts. The worst is "hey they are running proprietary fork and not open source anymore" when the code is available in plain sight. Canary build is available with one command. The stupid article made a huge stink about it without this key fact. Now they added the update but damage is done.

No, that's not correct. That is the discussion started by the article, and the one continued in many other comment threads, even including this one far further upthread. Conversations drift over time, and this thread has evolved into a subdiscussion on the topic of the rewrite itself. If this is not what you would like to discuss, I suggest you visit the other threads. If you would like to join us in this thread now…

Bun "contributor community", that provides significant amount of code contribution, is largely non-existent. Almost all of the work is done by Jarred and others at Oven. If someone still wants to contribute, they can do so on Rust. There is no reason to give warnings and plenty of time just to delay something like this when doing it rapidly is possible (now with AI).

Bun "user community", is not affected by this at all (yet) except the ai doomers/zig fanatics.

When v1.4.0 is fully released, and if Bun team can't get it to full feature (and no new serious bugs) parity with last zig version within a few versions (let's say v1.4.2), then there will be real effects.

I will be testing v140 after release. As a bun user community member, I expect no new type of crash, slightly faster perf/less memory usage and move on with my life.

A rewrite like this is unprecedented but doesn't mean impossible. I am cautiously optimistic.

Post reply on HN