Canonical Backs New Project to Translate Large C Codebases Into Safe Rust
Skip to content
No results
Search
Menu
Canonical Backs New Project to Translate Large C Codebases Into Safe Rust<br>Canonical is funding research into automated C-to-Rust translation, with AppArmor and snap-confine serving as real-world case studies.
ByBobby Borisov<br>OnAugust 20, 2026
Canonical is supporting a new three-year research project to make it practical to automatically move large, mature software projects from C to Rust. The project is a partnership between Canonical and the University of Bristol in the UK, and the work is set to start later in 2026.
The main goal is to build a complete platform that can translate large code repositories, sometimes with hundreds of thousands of lines of C, into safe, reliable, and maintainable Rust.
However, the bigger challenge is the huge amount of mature C software already in use. Manually rewriting these projects is costly and risky, since their code often includes years of fixes, compatibility updates, performance tweaks, and hidden knowledge.
Current source-to-source translators only address part of the problem. Canonical says these tools can handle a lot of code, but they often copy C structures too closely. This leads to Rust code that still relies on unsafe features, keeps C-style patterns, and needs a lot of cleanup before Rust developers would want to maintain it.
LLMs face a different challenge. They can often create good, idiomatic Rust for small, clear pieces of code, but managing the context of a whole repository is much harder. Also, code that looks right may not always work the same way as the original C version.
To address these challenges, the new project will use a hybrid, or ‘neurosymbolic,’ approach. This combines machine learning with traditional program analysis, testing, and formal methods.
According to Canonical, large code repositories will first be split into smaller parts that can be translated separately while preserving key details about types, dependencies, and how the program works.
The translation will use language models trained on known C-to-Rust examples, aiming to produce Rust code that uses proper Rust features instead of just copying C syntax. After translation, the new code will be checked to see if it behaves like the original C version.
For Ubuntu users, it’s important to note that the research will go beyond small academic examples. Canonical plans to use AppArmor and snap-confine as real-world case studies.
However, Canonical makes it clear that AppArmor and snap-confine are not being rewritten in Rust right now. These projects are only being used as case studies to test the technology, and there is no plan to replace their current versions with the research results.
Finally, just to add that the initiative also fits into Canonical’s broader adoption of Rust within Ubuntu. The company points to projects such as uutils coreutils and sudo-rs as examples of Rust implementations that have earned a place in the distribution.
For additional details, see the post on Ubuntu’s Discourse channels.
Tell others:
Share on X (Twitter)
Share on Reddit
Share on Facebook
Share on Threads
Share on Bluesky
Share on Telegram
Share on LinkedIn
Share on Hacker News
Bobby Borisov
Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.
Leave a ReplyCancel Reply<br>Your email address will not be published. Required fields are marked *
Name
Add Comment *
Save my name and email in this browser for the next time I comment.<br>Post Comment
Trending
Manjaro 26.1 Essentially Goes Final with Linux Kernel 7.1 and Plasma 6.7
GNOME 51 Beta Released with New Fingerprint UI, Blur Support, and More
Bazaar Joins GNOME Circle, Targets GNOME 52 as GNOME Software Successor
Debian Opens Vote on the Future of AI-Assisted Contributions
KDE Plasma 6.6 Gets Three Years of LTS Support
SUPPORT ME
Enjoy the article?<br>Just $2 and a moment of your time keep my Linux writing going 24/7. Please be kind and contribute a cup .
Related Posts
Rust Adopts Official Policy for AI-Generated Contributions<br>August 6, 2026
Rust-Based uutils Coreutils 0.10 Reaches 93.5% GNU Compatibility<br>August 5, 2026<br>1 Comment
Canonical Launches Private Enterprise Store for Snaps and Charms<br>July 21, 2026
Rust 1.97 Released with New Default Symbol Mangling Scheme<br>July 9, 2026