Meng Wang
Ownership and Lifetime Driven Synthesizer for Automatic C to Rust Translation
Rust is a modern programming language with growing popularity. It offers both low-level control as well as strong safety guarantees. The latter includes memory safety (free of double-frees, memory leaks, etc) enforced by an ownership (linear) type system, which is a significant advantage to the legacy language C. Existing C to Rust translators are limited to syntactic transformations aided by information from the rust compiler. They are unable to infer the ownership-schemes that exist in the programs and therefore cannot produce high-quality Rust code that are verified safe. In this work, we propose an ownership model for unsafe pointers and an inference approach of possible ownership schemes. Based on that information, we propose rewrite steps that significantly improve the safe-ratio of the resulting Rust programs.
back to overview
Watch Recording