Rustify: Towards Repository-Level C to Safer Rust via Workflow-Guided Multi-Agent Transpiler

ICLR 2026 Conference Submission18672 Authors

19 Sept 2025 (modified: 08 Oct 2025)ICLR 2026 Conference SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Keywords: Program translation; Repository-level code translation; Agent-based workflow; Large language models.
TL;DR: We present Rustify, a workflow-guided multi-agent framework that translates entire C repositories into safe, idiomatic Rust with high compilation and test success rates.
Abstract: Translating C to Rust at the repository level presents unique challenges because of complex dependencies and the differences between C's manual memory model and Rust's strict ownership rules. Existing approaches often overlook repository-wide dependencies and contextual structure, resulting in impractical and potentially unsafe Rust code. We propose Rustify, a workflow-guided architecture for repository-level C-to-Rust translation. Rustify decomposes the translation process into modular and role-specific stages, aligned with the structure of source repositories rather than dynamic plan-and-act strategies. These stages address the structural challenges of repository-level C-to-Rust translation, such as determining translation units and resolving cross-file dependencies, with each stage assigned to a dedicated LLM-powered agent. By orchestrating these agents through a structured workflow, Rustify systematically manages repository-wide translation while maintaining semantic equivalence and memory safety.The framework further integrates compiler feedback through tree search–based iterative repair and leverages a dynamic experience base to guide future translations. Experiments show that Rustify consistently produces fully memory-safe Rust code, reducing unsafe code by up to 99% compared to prior approaches. It successfully compiles eight out of nine repositories, raises the test pass rate from 10.5% in the baseline to 86.4%, and achieves high-quality, idiomatic Rust translation with CodeBLEU scores reaching 0.76. A replication repository is available at https://github.com/rustify712/Rustify.
Primary Area: applications to computer vision, audio, language, and other modalities
Submission Number: 18672
Loading