AI-assisted C-to-Rust translation for safer legacy software modernization

This technology is an automated C-to-Rust translation platform that helps modernize legacy software by reducing unsafe code while preserving program functionality.

Unmet Need: Scalable Rust modernization for unsafe legacy C software

Large C codebases remain difficult to secure and maintain because memory safety and concurrency errors can lead to vulnerabilities, crashes, and costly engineering work. Although Rust offers memory and thread safety with performance suitable for systems software, manually converting large C projects to Rust is labor-intensive, slow, and error prone. Existing automated approaches often produce unsafe or hard-to-maintain Rust, while LLM-based approaches can struggle with project-scale context and may introduce functional errors. There is a need for scalable tools that can reliably migrate legacy C software into safe, maintainable Rust without sacrificing correctness or performance.

The Technology: Automated C-to-Rust translation for safer legacy software

C2SAFERRUST uses a hybrid translation workflow to convert C projects into safer Rust while preserving the intended behavior of the original code. The system first uses rule-based transpilation to generate an initial Rust version, then breaks the translated code into smaller units that can be individually refined with large language models. Static analysis is used to identify dependencies and provide relevant context for each translation step, helping the system improve safety and readability while maintaining compatibility across the larger codebase.

The translated code is validated through compilation and end-to-end test cases after each refinement step. In reported testing on real-world programs, C2SAFERRUST reduced raw pointer use by up to 38% and unsafe Rust code by up to 28%, while the resulting programs continued to pass all test cases.

Applications:

  • Automated C-to-Rust code translation
  • Legacy software modernization
  • Software security improvement
  • Memory-safe systems programming
  • Developer productivity and code migration tools
  • Code validation and testing workflows
  • Research platform for AI-assisted code translation
  • Research platform for compiler and memory-safety studies

Advantages:

  • Automates migration from C to safer Rust
  • Reduces unsafe code and raw pointer usage
  • Improves readability and maintainability of translated code
  • Preserves functionality through compilation and testing workflows
  • Combines scalable transpilation with AI-guided code refinement
  • Reduces manual engineering effort for legacy software modernization
  • Supports development of memory-safe systems software

Lead Inventor:

Baishakhi Ray, Ph.D.

Patent Information:

Patent pending

Related Publications:

Tech Ventures Reference:

Quick Facts:
Tags
Legacy systemParallel computingPointer (computer programming)Static program analysisSystems programmingWorkflow
Inventors
Baishakhi Ray
Manager
Greg Maskel
Departments
Computer Science
Divisions
Fu Foundation School of Engineering and Applied Science (SEAS)
Reference Number
CU26072
Release Date
2026-07-17