potentialpaper

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

Chen Wang, Yujun Huang, Peng Li, Lina Gong, Fei Wu

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

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.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…