Ownership Guided C to Rust Translation
Hanliang Zhang, Cristina David, Yijun Yu, Meng Wang
Abstract
Abstract Dubbed a safer C, Rust is a modern programming language that combines memory safety and low-level control. This interesting combination has made Rust very popular among developers and there is a growing trend of migrating legacy codebases (very often in C) to Rust. In this paper, we present a C to Rust translation approach centred around static ownership analysis. We design a suite of analyses that infer ownership models of C pointers and automatically translate the pointers into safe Rust equivalents. The resulting tool, Crown, scales to real-world codebases (half a million lines of code in less than 10 s) and achieves a high conversion rate.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
15 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Scylla: Translating an Applicative Subset of C to Safe Rust cites Translating C to safer Rust
- Scylla: Translating an Applicative Subset of C to Safe Rust cites To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions
- Scalable, Validated Code Translation of Entire Projects using Large Language Models cites Translating C to safer Rust
- RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code cites Scalable, Validated Code Translation of Entire Projects using Large Language Models
- RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code cites Translating C to safer Rust
- C to checked C by 3c cites Translating C to safer Rust
- SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verification cites Translating C to safer Rust
- To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions cites Translating C to safer Rust
Cited by top-tier papers15
- Scalable, Validated Code Translation of Entire Projects using Large Language ModelsHanliang Zhang, Cristina David, Meng Wang, Brandon Paulsen et al.PLDI 2025 · 15 citations
- RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust CodeYubo Bai, Tapti PalitASE 2025 · 8 citations
- SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based VerificationTianyang Zhou, Ziyi Zhang, Haowen Lin, Somesh Jha et al.ACL 2026 · 8 citations
- Scylla: Translating an Applicative Subset of C to Safe RustAymeric Fromherz, Jonathan ProtzenkoOOPSLA 2026 · 6 citations
- To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged UnionsJaemin Hong, Sukyoung RyuASE 2024 · 6 citations
Builds on4
- Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 citations
- RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe codeYusuke Matsushita, Xavier Denis, Jacques-Henri Jourdan, Derek DreyerPLDI 2022 · 44 citations
- Modular specification and verification of closures in RustFabian Wolff, Aurel Bílý, Christoph Matheja, Peter Müller et al.OOPSLA 2021 · 23 citations
- C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline et al.OOPSLA 2022 · 20 citations
Related papers
- Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder et al.OOPSLA 2023 · 32 citations
- Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira et al.PLDI 2026 · 1 citation
- Translating C To Rust: Lessons from a User StudyRuishi Li, Bo Wang, Tianyu Li, Prateek Saxena et al.NDSS 2025
- Concrat: An Automatic C-to-Rust Lock API Translator for Concurrent ProgramsJaemin Hong, Sukyoung RyuICSE 2023 · 17 citations
- GenC2Rust: Towards Generating Generic Rust Code from CXiafa Wu, Brian DemskyICSE 2025 · 4 citations
