Live data from Hacker News

Rewrite Bun in Rust has been merged

github.com

221–230 of 822 posts

Re: Rewrite Bun in Rust has been merged

#221

Earlier quoted context omitted.

I'd be surprised if they could eliminate memory issues completely, especially considering the amount of `unsafe` the codebase seems to contain. git rev-parse HEAD && ag "unsafe" src | wc -l 19d8ade2c6c1f0eeae50bd9d7f2a4bf4a2551557 14865

Doesn't that count anything that has 'unsafe' in it, not just the keyword?

It does, see the sibling comment made about an hour before yours, fixing that issue has marginal difference.

Re: Rewrite Bun in Rust has been merged

#222
post #76

Still writing the blog post about this. Will share more details. For where this is coming from, skim the bugfixes in the Bun v1.3.14 and earlier release notes. Rust won’t catch all of these - leaks from holding references too long and anything that re-enters across the JS boundary are still on us. But a large % of that list is use-after-free, double-free, and forgot-to-free-on-error-path, which become compile errors…

Looking forward to the blog post. Do you plan to run both the Zig and Rust binaries side-by-side across a wide range of real applications (potentially shadowing in production) to weed out bugs?

That's way too smart, safe and sensible.

Re: Rewrite Bun in Rust has been merged

#223
post #196

Earlier quoted context omitted.

You're not alone in voicing this, another (now dead) comment did it earlier too with a bit more of an emotional response ( https://news.ycombinator.com/item?id=48134229 ). Still, do you folks never do something to see how you feel about something, then chose to go one way or another? I'm not sure why it's so hard to see that it was an overreaction at the time, because it was an experiment, then at one point it stoppe…

Yes sure it's ok to change your mind. But don't you think the people Jarred accused of "overreacting" in retrospect didn't?

No, what we knew then is still what was known then. Today is different, and seemingly they've committed to the rewrite, so now it makes sense that people have strong feelings about it, as it's no longer just an experiment.

Re: Rewrite Bun in Rust has been merged

#224
post #121

Love seeing the tests themselves getting modified, with random `sleep(1)` thrown around in a few of them. This bodes well, I pray some idiot at some large AI co actually ends up using this garbage in prod

Claude Code uses Bun as its runtime. If this has been merged, I expect that Bun-rust is good enough to power Anthropic's internal agents to do live testing.

Jarred had tweeted that they're using the rust version internally with Claude Code

Re: Rewrite Bun in Rust has been merged

#225
post #4

Turns out "its just an experiment, you all are overreacting" was just a lie to damp criticism. https://news.ycombinator.com/item?id=48019226

Surely the mods will be here to remind you that it's against the rules to direct personal attacks towards other community members, to fulminate and brigade.

Or do those protections only cover whiny open source developers upset about a chat bot writing blogs?

Re: Rewrite Bun in Rust has been merged

#226
post #6

I'm actually excited for somebody trying experimenting with automated translation, but I'm afraid this will be lots of backwards compatibility issues. I started looking at the commits, and it's basically solving the ,,tests not pass'' problem by changing the tests themselves. The real work of making it working on programs that are already deployed will be just starting now. The only silver lining I see is that the se…

The whole idea that my RUNTIME contains code that a single human hasn't looked at does make me uncomfortable, but if this actually works without a ton of issues it's pretty remarkable.

Don't worry, no one reviewed open source code before AI either. Basically nothing changed about the trust model.

Re: Rewrite Bun in Rust has been merged

#227

So the geniuses in the datacenter prefer to rewrite the full codebase in another language instead of maintaining and improving its own fork or contributing to make the current language better. Impressive to rewrite 1MLOC in a week yes, but this is more of a job of a million monkey programmers crammed in a datacenter than a bunch geniuses. And I would know, since I'm a monkey programmer who is in danger now... Or mayb…

> or contributing to make the current language better The people making Zig have said they don't want that.

They also said that:

> Code origin was not even a factor [0]

> AI is entirely besides the point here. The changes in this Zig fork are not desirable to upstream for several reasons. [1]

So my view here is that besides AI policies to filter low value contributions and "contributor poker" [2] to attract contributors vs just contributions, a well thought of genious implementation aligned with the Zig roadmap instead of the "hacky implementation for a flashy headline" [1] would have made the cut.

But then again this entertaining drama will sadly get deprecated by mid 2027 as the datacenters will be churning out their own opusrust and clankzig.

[0] https://news.ycombinator.com/item?id=48017255

[1] https://ziggit.dev/t/bun-s-zig-fork-got-4x-faster-compilatio...

[2] https://kristoff.it/blog/contributor-poker-and-ai/

Re: Rewrite Bun in Rust has been merged

#229
post #19
post #4

Turns out "its just an experiment, you all are overreacting" was just a lie to damp criticism. https://news.ycombinator.com/item?id=48019226

Merging a complete rewrite in another language in 9 days seems insane to me. Maybe I'm just too cautious but with something like this I'd split off as a separate binary and get some heavy use customers involved as testers first to see if it causes any unforeseen problems before slowly expanding it out. I'd want to be pretty damn confident it won't cause any regressions before sunsetting the original codebase in favor…

9 days is the official story. Nobody knows, how long they really work on.

Re: Rewrite Bun in Rust has been merged

#230

Earlier quoted context omitted.

The whole idea that my RUNTIME contains code that a single human hasn't looked at does make me uncomfortable, but if this actually works without a ton of issues it's pretty remarkable.

Don't worry, no one reviewed open source code before AI either. Basically nothing changed about the trust model.

The speed of the change did. This is the “climate has always been changing” argument climate deniers make. It is a true statement which is still a lie by omission. Climate deniers purposely ignore that the climate has never changed at the current rate, and AI-stans neglect to mention that before AI nobody was merging a 1M+ lines of code in one go.
Post reply on HN