ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation
Not on the map. Why?
Abstract (arXiv)
We present Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation, a two-phase pipeline for translating real-world C projects to safe Rust. Existing approaches either produce unsafe output without memory-safety guarantees or translate functions in isolation, failing to detect cross-unit type mismatches or handle unsafe constructs requiring whole-program reasoning. Furthermore, function-level LLM pipelines require coordinated caller updates when type signatures change, while project-scale systems often fail to produce compilable output under real-world dependency complexity. Encrust addresses these limitations by decoupling boundary adaptation from function logic via an Application Binary Interface (ABI)-preserving wrapper pattern and validating each intermediate state against the integrated codebase. Phase 1 (Encapsulated Substitution) translates each function using an ABI-preserving wrapper that splits it into two components: a caller-transparent shim retaining the original raw-pointer signature, and a safe inner function targeted by the LLM with a clean, scope-limited prompt. This enables independent per-function type changes with automatic rollback on failure, without coordinated caller updates. A deterministic, type-directed wrapper elimination pass then removes wrappers after successful translation. Phase 2 (Agentic Refinement) resolves unsafe constructs beyond per-function scope, including static mut globals, skipped wrapper pairs, and failed translations, using an LLM agent operating on the whole codebase under a baseline-aware verification gate. We evaluate Encrust on 7 GNU Coreutils programs and 8 libraries from the Laertes benchmark, showing substantial unsafe-construct reduction across all 15 programs while maintaining full test-vector correctness.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 12 of its 30 references that are in the map. First posted on arXiv 6 Apr 2026.
Builds on
12 of 30 references.
References · 12
- 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
- 2024VERT: Verified Equivalent Rust Transpilation with Large Language Models as Few-Shot Learnerscited by 20
- 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 18
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2023Ownership guided C to Rust translationcited by 13
- 2025RustMap: Towards Project-Scale C-to-Rust Migration via Program Analysis and LLMcited by 10
- 2025Integrating Rules and Semantics for LLM-Based C-to-Rust Translationcited by 6
- 2025Translating Large-Scale C Repositories to Idiomatic Rustcited by 6
- 2024SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalencecited by 5
- 2025LLMigrate: Transforming "Lazy" Large Language Models into Efficient Source Code Migratorscited by 4
- 2017Intel MPX Explained: An Empirical Study of Intel MPX and Software-based Bounds Checking Approachescited by 1
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026AdaTrans: Automated C to Rust Transformation via Error-Adaptive Repair ↗
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation
- 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning
- 2026From C to Idiomatic Rust: A Ship-of-Theseus Agentic Translation ↗
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migration
- 2026Mostly Automatic Translation of Language Interpreters from C to Safe Rust ↗
- 2024RustRepoTrans: Repository-level Code Translation Benchmark Targeting Rust