3 ms·
> Of course, if Bun's Rust port has tons of `unsafe`, it won't magically solve them all, but it'll still get better You get very few of the Rust guarantees whe
by lionkor 6mo ago
> Of course, if Bun's Rust port has tons of `unsafe`, it won't magically solve them all, but it'll still get better
You get very few of the Rust guarantees when you litter your code with unsafe to get around the safety checks (which is what they're doing here). I would not recommend running this in production.
- piker 6mo agoYes, liberal unsafe code makes in Rust it arguably worse than writing it in a presumed-unsafe language.
- boxed 6mo agoFrom what I understand, rust "unsafe" is actually pretty damn safe compared to an actually memory unsafe language.
- IshKebab 6mo agoNot really. In fact unsafe Rust is widely considered to be significantly harder to get right than C or Zig. E.g. see https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/ https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/ or https://lucumr.pocoo.org/2022/1/30/unsafe-rust/ https://lucumr.pocoo.org/2022/1/30/unsafe-rust/ The saving grace is that in idiomatic Rust code you have very little unsafe code - usually none. But yeah there's no way I would trust AI to get unsafe Rust right.
- lionkor 6mo agoIt's unsafe