Canonical Funds AI Research to Translate C Code to Rust

AI-generated image · US National Wire
A new PhD project aims to determine if LLMs can migrate massive legacy codebases into safe Rust without losing critical, undocumented logic.
Canonical is co-funding a three-year PhD project to investigate whether artificial intelligence can translate large C codebases into Rust. As first reported by The Register, the University of Bristol's Programming Languages Research Group will conduct the initiative.
Jon Seager, Canonical's engineering veep, announced the investment on Ubuntu's Discourse forum. The project focuses on whether LLMs can decompose programs consisting of hundreds of thousands of lines of C into smaller components and then rewrite them into maintainable, behaviorally correct, and safe Rust. Specifically, the effort intends to examine tools including AppArmor and snap-confine.
Seager noted that traditional source-to-source translators often produce results that are too literal, relying on unsafe operations and awkward C idioms that require significant manual correction. A primary challenge identified is that mature codebases often contain undocumented knowledge—years of patches and fixes for real-world corner cases—that may be lost during a rewrite.
The research is co-sponsored by Canonical and UK Research and Innovation, which is a public body overseen by the UK's Department for Business, Innovation, Science and Trade. The project will be overseen by Seager, Professor Meng Wang, and Dr. Cristina David of the University of Bristol.

