Automatically Translating C to Rust. - Hong, Jaemin; Ryu, Sukyoung (Communications of the ACM, 2025)
Migrating legacy systems from C to Rust offers a promising path to improve software reliability due to Rust’s strong safety guarantees. Automatic translators can assist this process, but current tools often produce code that is unsafe or unidiomatic, relying on features not fully validated by the Rust compiler. The use of carefully designed static analyses and code transformations can enhance translations by replacing unsafe constructs with safe, idiomatic alternatives. Additionally, large language models present a potential approach to C-to-Rust translation, though they frequently introduce type errors or behavioral deviations, suggesting that combining large language models with static analysis could be a fruitful direction for future research.