Live data from Hacker News

Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

github.com

181–190 of 366 posts

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#181
post #57

Earlier quoted context omitted.

Hmmm, given the general mood in this case, I feel like there's a lot of people keen to find any criticism of the code they can and amplify it as possible. Most of it strikes me as relatively shallow at the moment, though (that is, apart from the fact that merging such a large LLM assisted port is certainly a, uh _bold_ move (to put it lightly), there's not much that people are pointing out about the actual result tha…

[flagged]

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

> Please don't post comments saying that HN is turning into Reddit. It's a semi-noob illusion, as old as the hills.

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#182

Earlier quoted context omitted.

Sure. I'm completely unaffiliated and think Zig's AI stance is ridiculous & politically-motivated and a port is absolutely justified if they will not budge. Apparently I am deeply in the minority.

The no-AI policy of the Zig compiler project is for the compiler, other projects can do whatever they want. Bun's fork of Zig was just an unsound hack that at best would have produced a strictly inferior speedup compared to our current work with incremental compilation, which is already plenty usable: - June 2025 core team starts using it with the zig compiler itself https://ziglang.org/devlog/2025/#2025-06-14 - Apri…

> The no-AI policy of the Zig compiler project is for the compiler, other projects can do whatever they want.

Well, presumably they want to contribute to the compiler. I know that you did not like those contributions, and that view seems entirely valid, but obviously "no AI" rules out their development model (by design, and you likely think that's good, and maybe it is!).

Not intending to defend the bun move, but obviously a project using Zig and also using AI might feel motivated to avoid Zig since they're ruled out as contributors.

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#184

This case is wild and seems to perfectly encapsulate all the problems people complain about with vibecoded projects. The "rewrite it in rust" commit is +1M lines of code. Humans haven't looked at that in depth. In about a week, they saw the tests passed and pushed it to main. Now people have started to look through it and are pointing out glaring issues. And the solution is just going to be "feed it to another AI and…

This is more or less my take on it.

I am not against AI code, it can be perfectly fine.

The principle issue in my mind is the rate of change.

Once you rewrite a code base like this (in a week no less) the only way to work on it in the future is using AI tools because no single person has any knowledge about any specific piece of code base any more.

AI generated code that is run through a classic PR process would potentially be fine, but then you sorta lose the entire point of using AI.

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#185

Earlier quoted context omitted.

The author kept bragging about classes of bugs that would not happen with Rust.

A bug-for-bug port to Rust is the first step to fixing that. Assuming the port is actually 1:1 without any behavioral changes, these bugs already exist in the Zig code. The difference is now it's known where effort can be dedicated in order to one day have a memory-safe release of Bun. People have absolutely lost their mind over this and completely forgotten the benefits Rust gives you. I feel like I've gone back 10…

> Assuming the port is actually 1:1 without any behavioral changes

It's not, that's clear from this kind of bug popping up. Functionally this bug exists because `PathString` was converted into a "safe" Rust API but still works the same internally as the original Zig code did (via using `unsafe`), that introduces UB that wasn't there in the Zig code.

If it was attempting to be a 1:1 with no behavior changes (like c2Rust attempts to do) then this would not have been turned into a "safe" Rust API like this.

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#186

Earlier quoted context omitted.

I actually have not, for real. And I keep getting beaten up here on HN just for daring to say it. Makes you think who is who in this situation. Bullies screaming they are the victims.

A quick scan of your comment history suggests that you see one every day ;) And - the number of times I have been grossly downvoted for daring to utter a true word about Rust (or even Rust adjacent) will let you know your non-existent Rust evangelists are indeed the bullies - with one now screaming that he is a victim. If you want definitive proof - look at this sub thread where you're so triggered that people talk a…

My comment history? The very same one that keeps trying to extract out the location of those supposed Rust zealots and never even getting a single response except yesterday... and the linked comment was pretty mild? But I always get downvoted for having the gall to ask? That comment history?

Surely you mistyped that part of your comment with the one I wrote above, right? Understandable.

I guess we'll have to agree that we live in parallel realities though, reading your comment -- which I do find genuinely puzzling. Because I keep not seeing evangelists and the only one using troll-like language here is you, not me ("triggered", really?).

I am looking at the sub-thread. I guess I need new glasses. Still not seeing anyone fanatical / zealot or whatever. What I see are people who try to ground a discussion because a top comment happily tears down a straw man, and those comments are attempting to show that.

> Note: I say claimed not as a jab

Oh, I am sure. Your comment absolutely cannot be mistook for that.

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#187
When my lead developer refactored my small but crucial python service into golang with Gemini and Claude, I was hesitant to merge the code into master. Yet, my service had, like 20k daily active users.

I think they shat over the community who trusted them by trying to advertise their owner company

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#188

This case is wild and seems to perfectly encapsulate all the problems people complain about with vibecoded projects. The "rewrite it in rust" commit is +1M lines of code. Humans haven't looked at that in depth. In about a week, they saw the tests passed and pushed it to main. Now people have started to look through it and are pointing out glaring issues. And the solution is just going to be "feed it to another AI and…

> only solution appears to be "even more AI"

That's the idea, to transform businesses to be wholly dependent on "AI" service to develop software. What better way than to re/write entire codebases until no human being understands it.

The Zig project know this, and its so-called "anti-AI" policy is actually pro-community and cultivating human understanding. It's not about the tool or technology, per se, it's about people, knowledge, and sustainability.

In contrast, the Bun project is demonstrating how they doesn't care about any of that, YOLO-ing its way to losing the trust of its users, contributors, and maintainers. Oh well, AI will maintain the project now, since no one else can.

Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

#189

Earlier quoted context omitted.

[flagged]

Quite to the contrary to what you write, many people pushing for Rust explicitly recommend to be very restrictive about touching existing, battle tested code and only rewrite it if you're substantially refactoring it anyways, or if it is a critical exposed piece of functionality - such as media codecs for example, which have a long history of being broken. The winning strategy that for example the google android team…

> many people pushing for Rust

You have couched this correctly, because we all know there are people out there who do go around yelling "Rewrite it in X" without thought (where X is the flavour of the month)

I also wanted to say - your description of the /right/ way to align a project with tech X is a restatement of Martin Fowler's "Strangler pattern"

Can you edit your post - "equation because deteting errors" is ambiguous - deleting, or detecting - I cannot work out which you mean

Post reply on HN