Canonical, the powerhouse behind Ubuntu, is embarking on a forward-thinking initiative, throwing its weight behind a three-year PhD research project at the University of Bristol. The ambitious goal? To leverage the power of artificial intelligence, specifically large language models (LLMs), to meticulously translate extensive C codebases into the memory-safe and highly performant Rust programming language. This move signals a significant push towards enhancing software security and maintainability in the industry.
The project isn't just about a simple linguistic swap. Traditional code translators often fall short, frequently preserving inherent vulnerabilities and unsafe idioms from C in the newly translated Rust code. Canonical's vision, championed by Engineering VP Jon Seager, is far more profound. The research aims to develop methods that first decompose complex C programs into manageable, smaller components. This granular breakdown then allows sophisticated LLMs to rewrite these segments in Rust, focusing on generating behaviourally correct, genuinely safe, and easily maintainable code.
This groundbreaking research is a collaborative effort, co-sponsored by Canonical and UK Research and Innovation, a key public body supporting scientific and economic growth. The implications are vast, especially for critical infrastructure and long-standing software projects that rely heavily on C. By demonstrating the feasibility of AI-driven, high-quality C-to-Rust translation, the project could pave the way for a new era of secure software development. Canonical plans to examine specific foundational tools like snap-confine and AppArmor as potential early applications for this innovative translation methodology.








