This Bun rewrite feels like a potential Mythos marketing stunt.
Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
51–60 of 366 posts
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#52Earlier quoted context omitted.
"unsafe" is a promise to the compiler that you're going to ensure invariants that the compiler can't check. Rust only promises to eliminate UB if the invariants are held. You can still get UB by violating that promise, as this bug demonstrates.
But the title here says "in safe Rust", no? Is the unsafe code causing UB in safe code? I thought the unsafety couldn't "spread" like that in Rust.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#53Earlier quoted context omitted.
"unsafe" is a promise to the compiler that you're going to ensure invariants that the compiler can't check. Rust only promises to eliminate UB if the invariants are held. You can still get UB by violating that promise, as this bug demonstrates.
But the title here says "in safe Rust", no? Is the unsafe code causing UB in safe code? I thought the unsafety couldn't "spread" like that in Rust.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#54Earlier quoted context omitted.
"unsafe" is a promise to the compiler that you're going to ensure invariants that the compiler can't check. Rust only promises to eliminate UB if the invariants are held. You can still get UB by violating that promise, as this bug demonstrates.
But the title here says "in safe Rust", no? Is the unsafe code causing UB in safe code? I thought the unsafety couldn't "spread" like that in Rust.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#55Earlier quoted context omitted.
[flagged]
I'm not sure that HN is that influential that buying up a few accounts would matter. To what end?
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#56There'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…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#57There'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…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#58So Bun saga has been "Zig, let me Ai you" "no" *Ai's Zig fork, suffers from memory bugs* "Well I'm moving!" *Ai's code into Rust, suffers from memory bugs*
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#59Earlier quoted context omitted.
Safe Rust does. Unsafe Rust allows you to tell the compiler “hold my beer”. It’s a concession to the reality that the normal restrictions of Rust disallow some semantically valid programs that you might otherwise want to write. The safeguards work great in most cases, but in some they’re overly restrictive. In practice, the overwhelming majority of code is able to be written in safe Rust and the compiler can have you…
OK but the title says "in safe Rust". Am I misunderstanding something? All the replies here are saying how it's allowed in unsafe Rust, which is not what the title says.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#60In this case, I would trust the output even less than the input. The input was memory-unsafe but hand-written. The output is memory-unsafe but also vibe-coded and has had no eyeballs on it. What is the point of abusing agentic AI for this use-case?