高级检索

面向Rust语言的代码转译研究进展与挑战

Research Progress and Challenges in Code Translation for the Rust Language

  • 摘要: 随着Rust语言在操作系统、平台软件与基础软件中的应用不断深入,如何推动既有软件资产向Rust生态平稳迁移,已成为兼具产业价值与研究意义的重要问题。面向Rust的代码转译,正在从传统的源到源转换技术,逐步发展为一种面向软件迁移的系统化方法。本文首先分析Rust兴起的技术背景以及既有系统向Rust演进的现实动因,阐述代码转译在继承既有软件资产、释放Rust安全优势和支撑受控软件演化方面的重要价值;随后从基于规则的转译方法、基于大模型的直接转译方法、分析增强的神经符号混合转译方法及面向项目级迁移的增量转译方法4个方面,对当前主要技术路线及其研究进展进行梳理;在此基础上,总结程序语义保持、Rust化重构、第三方依赖迁移、复杂系统耦合、结果校验保障和项目级上下文组织等方面的关键挑战,并讨论未来的发展趋势。总体来看,面向Rust的代码转译正从代码转换走向软件迁移,其研究意义已超越单纯的代码生成问题,正在成为连接语言演进、软件工程与基础软件生态重构的重要技术方向。

     

    Abstract: With the growing adoption of Rust in operating systems, platform software, and infrastructure software, how to migrate existing software assets into the Rust ecosystem has become an important problem with both industrial and research significance. Code translation for Rust is evolving from traditional source-to-source transformation into a systematic approach to software migration. This article first analyzes the technical background of Rust and the practical motivations for evolving existing systems toward Rust, and then explains the value of code translation in preserving software assets, realizing Rust’s safety benefits, and supporting controlled software evolution. It further reviews current research progress from four perspectives: rule-based translation, direct translation based on large language models, analysis-enhanced neuro-symbolic translation, and project-level incremental migration. On this basis, it summarizes key challenges including semantic preservation, Rust-oriented reconstruction, third-party dependency migration, complex system coupling, result validation, and project-level context organization, and discusses future development trends. Overall, code translation for Rust is moving from code conversion toward software migration, becoming an important technical direction that connects language evolution, software engineering, and the reconstruction of infrastructure software ecosystems.

     

/

返回文章
返回