Build-Aware Incremental C-to-Rust Migration via Skeleton-First Translation and Historical Knowledge Reuse
Shengbo Wang, Mingwei Liu, Guangsheng Ou, Yuwen Chen, Zike Li, Yanlin Wang, Zibin Zheng

TL;DR
This paper introduces His2Trans, a build-aware framework for incremental C-to-Rust migration that reconstructs project skeletons and leverages historical knowledge to improve build success and reduce unsafe code.
Contribution
It presents a novel approach combining build trace reconstruction and knowledge reuse to enable stable, project-level C-to-Rust migration in complex build environments.
Findings
Achieves 97.51% incremental compilation pass rate on OpenHarmony modules.
Reduces unsafe code ratio by 24.02 percentage points compared to C2Rust.
Decreases average repair rounds on unseen modules by about 60%.
Abstract
Automating C-to-Rust migration for industrial software remains difficult because build-critical context is scattered across compile configurations, macros, external symbols, and cross-module dependencies, while reusable migration knowledge is often buried in prior C/Rust evolution. As a result, existing LLM-based approaches often work well on isolated functions or small benchmarks but struggle to produce stable project-level translations in partially migrated systems. We present His2Trans, a framework for incremental C-to-Rust migration in build-complex ecosystems where C and Rust coexist. His2Trans first reconstructs a compilable project-level Rust skeleton from build traces, recovering modules, type definitions, signatures, globals, and dependency relations before function-body generation. It then retrieves Rust-side interfaces and local coding patterns mined from historical…
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.
