Models & research
Canonical Backs Neurosymbolic AI Research to Automate C to Rust Refactoring
Canonical partnered with the University of Bristol on a three-year research project to automatically translate massive C repositories into safe Rust. The initiative uses a neurosymbolic approach, pairing LLMs trained on C-to-Rust patterns with formal verification and program analysis.
August 20, 2026 3 min read
Curated by Oleksandr Kuzmenko, AI Product EngineerUpdated August 20, 2026Sources cited on every story
AI-assisted · editor-reviewedHow we use AI

Impact: Medium
Why it matters
Engineers working on legacy migration can apply neurosymbolic patterns by splitting repositories into domain modules before feeding them to LLM refactoring workflows.
TL;DR
- 01Hybrid neurosymbolic translation combines generative LLMs with deterministic formal verification.
- 02Modular decomposition of dependencies is required before passing legacy code bases into LLM contexts.
- 03Canonical tests the technology on AppArmor and snap-confine as real-world benchmarks.
Key facts
- Project Duration
- 3 years
- Partners
- Canonical & University of Bristol
- Test Case Codebases
- AppArmor, snap-confine
Limitations of Traditional Converters and Raw LLMs Translating production C code to Rust involves preserving decades of performance tweaks, edge-case bug fixes, and implicit memory behaviors. Rule-based transpilers emit unmaintainable, unsafe Rust. Standard LLMs hallucinate subtle logic shifts when handling full repository contexts. ### The Neurosymbolic Hybrid Pipeline Canonical and the University of Bristol decompose repositories into modular blocks, tracking dependency topologies. fine-tuned LLMs generate idiomatic Rust constructs. Subsequently, static analysis and formal testing tools verify that the compiled Rust output matches the operational behavior of the original C code.
✓ When to use
- Use when designing refactoring agents for C and C++ legacy modernization.
- Use neurosymbolic verification workflows when automated safety guarantees are required.
✕ When NOT to use
- Do not rely solely on LLMs to translate low-level memory operations without static analysis tools.
- Do not apply direct prompt translation to unsegmented C codebases over 10,000 lines.
What to do today
- Decompose large legacy modules into standalone functions before running LLM-based refactoring tools.
- Implement automated behavioral test suites to validate logic parity when migrating C to Rust.
#Canonical#Ubuntu#AppArmor
Sources