News for hackers. Stuff that matters.
Re:Rust to C compiler – 95.9% test pass rate, odd platforms by josephg on Saturday April 12, 2025 @03:05AM (#43662045)
Should be. The rust borrow checker has no runtime component. It checks the code as-is before (or during) compilation.

Arguably it’s not the compiled binary that’s “safe”. It’s the code.

Re:Rust to C compiler – 95.9% test pass rate, odd platforms by kreetx on Saturday April 12, 2025 @06:22AM (#43663103)
Borrow checker, and more generally any type checkers, are essentially terminating programs ran during compilation process, thus safety guarantees given by them are ensured before the code is transformed into some target language.
Re:Rust to C compiler – 95.9% test pass rate, odd platforms by olivermuty on Saturday April 12, 2025 @07:12AM (#43663394)
Thats assuming lossless transpilation though
Re:Rust to C compiler – 95.9% test pass rate, odd platforms by kreetx on Saturday April 12, 2025 @08:05AM (#43663687)
If you mean 'no bugs in compiler' then yes. The safety of the target language doesn't matter: the output C is has an equivalent role to output machine code, those languages themselves are as unsafe as they can get, it's just that compilers output is a safer subsection of 'all programs which can be expressed in them'.
Re:Rust to C compiler – 95.9% test pass rate, odd platforms by carlmr on Saturday April 12, 2025 @07:49AM (#43663599)
That's a problem for almost every language, not just Rust. C++ also compiles to intermediate representations, and then to machine code. Errors happen on that path. Rust just get rid of a lot of errors that could have been in the original specification (the source code).