Remix.run Logo
K0nserv an hour ago

It's not that weird to end up with this when translating C/Zig/C++ to Rust. A first pass can use unsafe and then when the code is in Rust you can work on reducing the unsafe.

Trying to eliminate all unsafe as part of the rewrite, whether done by human or LLM, would be making too big of a change in the process of rewriting.

q3k an hour ago | parent [-]

> would be making too big of a change in the process of rewriting

God forbid the already unreviewable -710kloc/+1mloc change get any bigger!

K0nserv an hour ago | parent [-]

Sure, but that's kind of orthogonal. Imagine doing this by hand I still think going like-for-like with the Zig, even if that means a lot of unsafe, is a good approach.

But I suppose if you are already using LLMs it's more reasonable to try and go from Zig straight to Rust with no/minimal unsafe.