Ownership guided C to Rust translation

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 R...

Full description

Bibliographic Details
Main Authors: Zhang, Hanliang, David, Cristina, Yu, Yijun, Wang, Meng
Format: Text
Language:unknown
Published: 2023
Subjects:
Online Access:http://arxiv.org/abs/2303.10515
id ftarxivpreprints:oai:arXiv.org:2303.10515
record_format openpolar
spelling ftarxivpreprints:oai:arXiv.org:2303.10515 2023-09-05T13:23:43+02:00 Ownership guided C to Rust translation Zhang, Hanliang David, Cristina Yu, Yijun Wang, Meng 2023-03-18 http://arxiv.org/abs/2303.10515 unknown http://arxiv.org/abs/2303.10515 Computer Science - Programming Languages Computer Science - Software Engineering text 2023 ftarxivpreprints 2023-08-16T17:35:59Z 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. Text The Pointers ArXiv.org (Cornell University Library)
institution Open Polar
collection ArXiv.org (Cornell University Library)
op_collection_id ftarxivpreprints
language unknown
topic Computer Science - Programming Languages
Computer Science - Software Engineering
spellingShingle Computer Science - Programming Languages
Computer Science - Software Engineering
Zhang, Hanliang
David, Cristina
Yu, Yijun
Wang, Meng
Ownership guided C to Rust translation
topic_facet Computer Science - Programming Languages
Computer Science - Software Engineering
description 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.
format Text
author Zhang, Hanliang
David, Cristina
Yu, Yijun
Wang, Meng
author_facet Zhang, Hanliang
David, Cristina
Yu, Yijun
Wang, Meng
author_sort Zhang, Hanliang
title Ownership guided C to Rust translation
title_short Ownership guided C to Rust translation
title_full Ownership guided C to Rust translation
title_fullStr Ownership guided C to Rust translation
title_full_unstemmed Ownership guided C to Rust translation
title_sort ownership guided c to rust translation
publishDate 2023
url http://arxiv.org/abs/2303.10515
genre The Pointers
genre_facet The Pointers
op_relation http://arxiv.org/abs/2303.10515
_version_ 1776204306237620224