Remix.run Logo
piker 3 hours ago

Wow, it's unsafe Rust? That seems... like the worst of all worlds.

If nobody knows why the unsafe is required there's no way they'll be able to unwind it. If they can't unwind it then they're in a worse version of C (+ cargo).

fnands 2 hours ago | parent | next [-]

Not a lot of it is unsafe, I think they said 4%?

It's practically impossible to write safe Rust when you are calling external libs written in C/C++, like they do for the Javascript engine.

kawogi 3 hours ago | parent | prev | next [-]

IIUC that was meant as an intermediate step (which isn't uncommon), which IMO makes the translation way less exciting.

The interesting part will be whether they can transform that "mechanical Rust" into something idiomatic. I'm waiting ...

piker 2 hours ago | parent [-]

Fair, but that's also kinda like saying "we translated it to ASM as an intermediate step to C". The hard (and valuable) part is safe rust. If unsafe is everywhere, there will be abstractions that simply have to be reengineered to use safe rust. Maybe it's a way to hit the "finish line" quick in terms of using Rust but a pure unsafe translation seems almost as far away as the original Zig project.

bigcityslider 3 hours ago | parent | prev [-]

Unsafe Rust makes me think they did this entirely because LLMs are better at Rust than at Zig, but let's see what happens next.