Canonical is funding a three-year PhD research project with the University of Bristol to build a platform that automatically translates large C codebases into idiomatic, behaviorally correct Rust. Led by Professor Meng Wang with Canonical's Jon Seager and Dr. Cristina David as co-supervisors, the project combines machine learning translation with formal program analysis and validation to avoid the pitfalls of naive source-to-source translators and unreliable LLM output. The proposed architecture has four stages: scheduling, translation, validation, and debugging/repair. AppArmor and snap-confine are named as case studies, though Canonical stresses this is not a commitment to replace them.

3m read timeFrom infoworld.com
Post cover image

Questions this post answers

Is Canonical funding a project to automatically translate C code into Rust?

Yes, Canonical and UK Research and Innovation are funding a three-year PhD project at the University of Bristol to build a platform that translates large C repositories into behaviorally correct, idiomatic Rust. Professor Meng Wang leads the project, with Canonical's Jon Seager and Dr. Cristina David as co-supervisors of PhD student Alex Wood. Teams weighing a move away from C toward Rust can follow migration research like this on daily.dev.

Why can't large language models alone reliably translate C code to Rust?

LLMs can produce convincing, idiomatic Rust but struggle with repository-scale context and offer no guarantee the translated program behaves like the original source. Plausible-looking output is not evidence of correctness, so generated code must be treated as untrusted until validated against the source's actual behavior through separate program analysis. daily.dev helps developers evaluating AI-assisted code translation stay current on validation techniques.

What Ubuntu components are being used as case studies for C to Rust translation research?

AppArmor and snap-confine, two Ubuntu security components, are the targeted case studies for Canonical's C-to-Rust translation research. Canonical clarified this is not a commitment to replace either component with generated Rust code, but reflects a vested interest in seeing how the translation system performs on real, security-sensitive software. daily.dev keeps developers tracking Rust adoption in core Linux security tooling up to date.

1 Impression