Author:
Zhang Hanliang,David Cristina,Yu Yijun,Wang Meng
Abstract
AbstractDubbed 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.
Publisher
Springer Nature Switzerland
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. On the Impact of Memory Safety on Fast Network I/O;2024 IEEE 25th International Conference on High Performance Switching and Routing (HPSR);2024-07-22
2. Migrating C to Rust for Memory Safety;IEEE Security & Privacy;2024-07
3. Don’t Write, but Return: Replacing Output Parameters with Algebraic Data Types in C-to-Rust Translation;Proceedings of the ACM on Programming Languages;2024-06-20
4. Rust-lancet: Automated Ownership-Rule-Violation Fixing with Behavior Preservation;Proceedings of the IEEE/ACM 46th International Conference on Software Engineering;2024-04-12