4 ms·
$ grep --exclude-dir=.git -r 'unsafe {' | wc -l 10465 Nice.
by q3k 5mo ago
$ grep --exclude-dir=.git -r 'unsafe {' | wc -l
10465
Nice.
- janice1999 5mo agoThe benefit of using Rust is that you know exactly where the unsafe code is so you can handle it explicitly and deliberately to avoid issues by imposing carefully crafted constraints... oh.
- K0nserv 5mo agoIt'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 5mo ago> 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 5mo agoSure, 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.