HackerPapers

arXiv:2303.10515cs.PL

Ownership guided C to Rust translation

Hanliang Zhang, Cristina David, Yijun Yu, Meng Wang

HN submission. Found in a submission link or body. Submitters do not count as commenters in the main ranking; a submission is not an endorsement.

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 seconds) and achieves a high conversion rate.

arXiv comments
Journal reference
DOI
Subjects
cs.PLProgramming Languages cs.SESoftware Engineering

On Hacker News

No comments linking this paper were found in the collected sources. Found in 2 HN submissions from Mar 2023 to Jun 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments0 threads

No comments linking this paper were found in the collected sources. Open submission discussions.

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.