EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation
Chaofan Wang, Tingrui Yu, Beijun Shen, Jie Wang, Dong Chen, Wenrui Zhang, Yuling Shi, Chen Xie, Xiaodong Gu

TL;DR
EvoC2Rust is an automated, skeleton-guided framework that effectively translates entire C projects into Rust, combining rule-based and LLM techniques to improve safety, correctness, and idiomaticity at project scale.
Contribution
The paper introduces EvoC2Rust, a novel project-level C-to-Rust translation framework that integrates skeleton-guided translation with evolutionary augmentation, outperforming existing methods.
Findings
Outperforms LLM-based baseline by 17.24% in syntax accuracy.
Achieves 14.32% higher semantic accuracy.
Provides 43.59% higher code safety rate than rule-based tools.
Abstract
Translating legacy C codebases to Rust is increasingly demanded for building safety-critical systems. While various approaches have emerged for this task, they face inherent trade-offs: rule-based methods often struggle to satisfy code safety and idiomaticity requirements, while LLM-based methods frequently fail to generate semantically equivalent Rust code, due to the heavy dependencies of modules across the entire codebase. Recent studies have revealed that both solutions are limited to small-scale programs. In this paper, we propose EvoC2Rust, an automated framework for converting complete C projects to equivalent Rust ones. EvoC2Rust employs a skeleton-guided translation strategy for project-level translation. The pipeline consists of three stages: 1) it first decomposes the C project into functional modules, employs a feature-mapping-enhanced LLM to transform definitions and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
