I thought Rust treated undefined behaviour as a compiler bug? Does anyone know what's actually happening here?
Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
121–130 of 366 posts
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#122Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#1231 week turnaround I guess is what they meant.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#124Earlier quoted context omitted.
Not just marketing and PR, the mainstream media knows that pushing out BS and then retracting it later can have lasting effects because people will remember the original article / headline, and never see the correction.
only the mainstream media knows about this? Quite odd to qualify media this way here, when most of all media uses this mechanism. We also forgot politicians who are experts in this field.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#125Earlier quoted context omitted.
>There are well-known tools in the Rust ecosystem that detect this kind of error Yes, tools like Miri, which this very post is about.
Indeed. My point is that just using the standard tools in the Rust ecosystem - like miri - would have trivially uncovered this error before it made it to the mainline.
I've seen large rewrites and migrations take both approaches -- in my experience, the former usually works out better.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#126There's a book that changed a lot of the way I think about attention and media [0]. The book isn't very good, but it flags something relevant here. There is a huge asymmetry between the reach of a big, flashy announcement (here: bun was re-written in memory-safe rust in a couple weeks), and the relatively small reach of a correction (often just a footnote on an old article, here a GH issue). This asymmetry is well un…
Is this the concept that's referred to in the quote "a lie can travel halfway around the world before the truth puts on its shoes"?
In your quote, there is no time-dependency between the lie and the truth. Whereas here, it's an attractive lie (easily parsed, great narrative), followed up by truths (that need more than surface-level analysis).
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#127Earlier 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…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#128What I don't understand is if they were going to translate Zig to unsafe Rust, why not just build a translation tool for it? You could do a one-to-one mapping of language constructs, hardcoding patterns in your codebase, and as one friend put it "Tbh they could've just hooked up zig translate-c to c2rust". They would get deterministic translation, would probably have not been a heavy investment to build, and the outp…
> why not just build a translation tool for it? They did ;) a highly dynamic one...
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#129Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#130Earlier quoted context omitted.
But nobody makes announcements and blog posts about running that.
There's several blog posts here. https://www.memorysafety.org/initiative/av1/
The newer posts go into detail about the rearchitecting that follows.