logoalt Hacker News

josephgyesterday at 9:39 AM2 repliesview on HN

People are so funny about rust.

“Safe rust isn’t expressive enough!” -> then use unsafe rust.

“Unsafe rust lets you do anything! Even crazy things!” -> then use safe rust. Or just don’t write crazy code?

Does bun actually do anything insane like that in its unsafe blocks? Or are you just fear mongering?


Replies

adwnyesterday at 11:47 AM

Please try to interpret comments in the context of the discussion, not floating freely in a vacuum. The context of the discussion is the Bun port's excessive use of unreviewed unsafe blocks. unsafe in Rust can easily be misused to create Undefined Behavior, which renders any safety guarantees otherwise ensured by Rust's borrow checker invalid.

> Does bun actually do anything insane like that in its unsafe blocks?

Who knows? At 10k unreviewed uses of unsafe, I'd guess there are quite a few incorrect ones. LLMs don't produce perfect code (neither do humans), so there's a high probability that at least some of those create UB.

throwaway613746yesterday at 1:13 PM

> Does bun actually do anything insane like that in its unsafe blocks?

How would anyone even know, it's vibe coded.