Canonical is funding a PhD to find out if AI can turn millions of lines of C into Rust

It's a three-year research project, not a bot rampage. Ubuntu's parent company wants actual evidence before touching its codebase.

AI2Day Newsdesk4 min read
Close-up top-down view of a small wooden toy block and a soft rubber ball resting on a pale hardwood floor, warm natural window light casting gentle shadows, sh
Share

Key points

  • Canonical is co-funding a three-year PhD at the University of Bristol to study whether AI can automatically translate large C codebases into the Rust programming language.
  • The project is co-sponsored by UK Research and Innovation, a UK government-backed public body, alongside Canonical's own money.
  • Ubuntu engineering VP Jon Seager announced the project on Ubuntu's Discourse forum in 2025.
  • The research will focus on two real tools: snap-confine and AppArmor, both written in C.
  • This is exploratory research, not a plan to rewrite Ubuntu itself.

Canonical, the company behind the Ubuntu operating system, is putting money behind a question the software world has been quietly arguing about: can an AI read a huge pile of old C code and rewrite it automatically in Rust?

C is a programming language that has powered software for decades. It is fast, but it is notoriously easy to write C code that has dangerous security holes. Rust is a newer programming language designed to block a whole class of those holes from ever existing. The catch is that converting one to the other is painfully slow when done by hand.

What exactly is Canonical paying for?

A PhD student at the University of Bristol's Programming Languages Research Group will spend three years investigating whether a large language model (an LLM, the technology behind tools like ChatGPT) can reliably do that translation. Professor Meng Wang and Dr Cristina David will supervise the student alongside Seager.

The proposal, first reported by The Register AI, runs to just over 1,000 words and is worth reading in full. The plan is not to paste an entire operating system into a chatbot. Instead, the idea is to first break a giant codebase (potentially hundreds of thousands of lines) into smaller, manageable chunks, then use an AI to rewrite each chunk in "safe, behaviourally correct and maintainable Rust." The two tools named as test subjects are snap-confine and AppArmor, both security-related components already used in Ubuntu.

For a concrete picture: imagine a 30-year-old filing cabinet stuffed with handwritten notes, some in a language only three people ever spoke. The PhD project is asking whether AI can read it all, understand the logic behind every scrawled margin note, and type it up cleanly in a modern format without losing anything important.

That last bit is the hard part. Mature codebases carry decades of knowledge baked silently into the code itself: patches for bugs nobody remembered to document, workarounds for edge cases that only showed up in production. A human rewriting from scratch might miss them entirely. An AI translation, done carefully, might preserve them.

Will this actually work?

Honestly, nobody knows yet. That is the point of the research.

Existing automated translation tools already exist, but Seager's post notes that they tend to produce Rust code that still behaves like C code under the hood, leaning on "unsafe" operations and awkward patterns that a Rust developer would immediately want to fix. The PhD project specifically aims to do better.

The trickier challenge may not be the translation itself, but the decomposition step: figuring out how to slice a sprawling codebase into pieces small enough for an AI to handle without losing the threads that connect them. That is an unsolved problem in computer science, and three years of research may find it is genuinely very hard.

What does this mean for ordinary Ubuntu users?

Nothing changes for now. This is research, not a release schedule. If it succeeds, the long-term payoff would be software that is harder for attackers to exploit, arriving faster than if developers rewrote everything by hand.

The project is co-funded by UK Research and Innovation, a public body backed by the UK's Department for Business, Innovation, Science and Trade. Real public money; real accountability.

Common questions

Is Canonical planning to rewrite all of Ubuntu in Rust?

No. This project investigates whether AI-assisted translation is even feasible on large codebases. A full Ubuntu rewrite is not on the table.

What is Rust and why does it matter?

Rust is a programming language designed to eliminate a category of security vulnerabilities that are common in older languages like C. More Rust in core software generally means fewer exploitable bugs.

How long before this affects any real software?

At minimum, three years for the research itself. Any practical adoption based on the findings would come after that.

© 2026 AI2Day