Remix.run Logo
logicchop 2 hours ago

If I can autoport my C++ to Rust, and the port is confirmed identical, and the Rust is confirmed safe, can't I use that to reason about the safety of my C++? Is safe C++ just a matter of proving it has a safe Rust equivalent?

johnbender 2 hours ago | parent | next [-]

It depends on what “confirmed identical” means. Most compilers (or translators as you like) only guarantee that the output program represents a subset of the behaviors of the input program so it could be that subset is the “safe as in Rust” subset.

_flux 2 hours ago | parent | prev [-]

The conversions seem to use (sometimes?) unsafe blocks.