Bun's unreleased Rust port has 13,365 unsafe blocks
51–57 of 57 posts
Re: Bun's unreleased Rust port has 13,365 unsafe blocks
#52Remember kids, unsafe is not undefined behaviour. It just means you need to prove via unchecked English statements that your code is not UB.
Re: Bun's unreleased Rust port has 13,365 unsafe blocks
#53Bun is(was?) a lot about performance. How does it compare to zig?
Rust and Zig both use the same optimizing compiler (LLVM) so assuming the vibe coded port didn't introduce performance pitfalls and kept the algorithms the same, the end result should be in the single digit performance difference with the original.
Re: Bun's unreleased Rust port has 13,365 unsafe blocks
#54Earlier quoted context omitted.
Rust and Zig both use the same optimizing compiler (LLVM) so assuming the vibe coded port didn't introduce performance pitfalls and kept the algorithms the same, the end result should be in the single digit performance difference with the original.
I believe in the latest (possibly two latest?) releases of Zig you have the option to build a self hosted compiler.
Re: Bun's unreleased Rust port has 13,365 unsafe blocks
#55Assertions without context, charts about other charts, numbers (so many numbers) without data. An audit with no auditor. Pure infoslop. What a time to be alive.
Re: Bun's unreleased Rust port has 13,365 unsafe blocks
#56The current level of insanity with AI is off the charts. Porting to a safe language without the safety features.
As a human I would likely port it the same way. First a translation close to 1:1 from the source, then redesign/refactor areas little by little to match the target language idioms
Re: Bun's unreleased Rust port has 13,365 unsafe blocks
#5713k unsafe blocks is a reminder that unsafe on its own isn’t the problem, it’s whether that unsafe boundary is small and audited. The number that matters more is how much of the codebase depends on unchecked invariants. If the answer is most of it, the port is moving too fast.