HN user

selfmodruntime

3,499 karma
Posts0
Comments1,373
View on HN
No posts found.

It's the wrong abstraction though and I am kind of not surprised the Bun maintainers went way. The correct abstraction would be to translate into Rust while using `clone` and `copy` liberally and then iteratively converting to a borrowing model. Nowhere at all was an introduction of the `unsafe` keyword needed.

The industry isn't biting @ Zig because it's unstable, notoriously difficult to integrate new changes into an existing codebase and because the compiler is a bitch to develop with (hard error on unused variables with no way to turn it off).

How is that better than the Zig codebase you started with?

It's worse, and I say this as an avid Rust fan and programmer. Try Miri with the new Bun project. It's currently blowing up. The Rust compiler's non-unsafe aliasing rules still need to hold during unsafe, which are far more complex than writing correct Zig code. That's the trade-off about Rust: The compiler has a ton of clever proofs for safe code, but if you're on your own, you'll have to do the work yourself.