Documentation-Guided Agentic Codebase Migration from C to Rust
Minh Le-Anh, Anh Nguyen Hoang, Bach Le, Nghi D. Q. Bui

TL;DR
RustPrint is a documentation-guided framework that enables repository-level C-to-Rust migration, capturing architectural intent and using iterative repair signals to improve translation quality.
Contribution
It introduces a novel documentation-guided approach for large-scale C-to-Rust migration, surpassing prior LLM-based translators in compilation success and feature preservation.
Findings
RustPrint compiles all eight real-world C repositories tested.
It outperforms prior LLM-based translators in feature preservation and test pass rate.
Documentation-guided coordination improves scalability and quality of codebase migration.
Abstract
Migrating legacy C repositories to Rust promises stronger memory safety, but existing translators often work at the level of files or functions and miss architectural intent. We present RustPrint, a documentation-guided agentic framework for repository-level C-to-Rust migration. RustPrint first converts the source repository into architecture-aware documentation and treats it as a migration blueprint capturing module structure, data flow, APIs, and design rationale. Coding agents then use this blueprint to plan crates, implement modules, check compilability, reduce unsafe code, and iteratively refine the translated repository. RustPrint next compares documentation from the Rust output against the source documentation and uses mismatches as repair signals. It also translates and runs source test suites so runtime failures can guide targeted fixes. Experiments on eight real-world C…
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.
