{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,3]],"date-time":"2026-07-03T16:26:24Z","timestamp":1783095984422,"version":"3.54.6"},"reference-count":33,"publisher":"Association for Computing Machinery (ACM)","issue":"11","license":[{"start":{"date-parts":[[2025,10,29]],"date-time":"2025-10-29T00:00:00Z","timestamp":1761696000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Commun. ACM"],"published-print":{"date-parts":[[2025,11]]},"abstract":"<jats:p>Legacy system programs developed in C have suffered from prevalent memory bugs. Migrating these systems to Rust is a promising way to enhance reliability, thanks to Rust\u2019s strong safety guarantee. Due to the high cost of manual migration, automatic C-to-Rust translators are essential for enabling the migration of real-world systems. However, existing translators generate unsatisfactory code by relying on language features whose safety is not validated by the compiler and code patterns considered unidiomatic by Rust developers. To improve the quality of automatic translation, static analysis and code transformation can be employed to replace unsafe features and unidiomatic patterns with safe and idiomatic alternatives. This article discusses the research community\u2019s efforts to address scalar pointers, locks, unions with tags, and output parameters, and introduces remaining unsafe features and unidiomatic patterns that future work should tackle. Furthermore, we explore the potential of using large language models for C-to-Rust translation.<\/jats:p>","DOI":"10.1145\/3737696","type":"journal-article","created":{"date-parts":[[2025,10,24]],"date-time":"2025-10-24T14:13:48Z","timestamp":1761315228000},"page":"58-65","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":2,"title":["Automatically Translating C to Rust"],"prefix":"10.1145","volume":"68","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4067-7369","authenticated-orcid":false,"given":"Jaemin","family":"Hong","sequence":"first","affiliation":[{"name":"KAIST, School of Computing, Daejeon, Daejeon, Korea (the Republic of)"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0019-9772","authenticated-orcid":false,"given":"Sukyoung","family":"Ryu","sequence":"additional","affiliation":[{"name":"KAIST, Daejeon, Daejeon, Korea (the Republic of)"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,10,29]]},"reference":[{"key":"e_1_3_1_2_2","doi-asserted-by":"crossref","unstructured":"Anderson B. et al. Engineering the Servo web browser engine ussing Rust. In Proceedings of the 38th Intern. Conf. on Software Engineering Companion. ACM\u00a0(2016) 81\u201389.","DOI":"10.1145\/2889160.2889229"},{"key":"e_1_3_1_3_2","unstructured":"Boos K. et al.\u00a0Theseus: An experiment in operating system structure and state management. In Proceedings of the 14th USENIX Conf. on Operating Systems Design and Implementation. USENIX\u00a0(2020)."},{"key":"e_1_3_1_4_2","unstructured":"Carey S. How companies are moving on from Cobol. Infoworld\u00a0(May 10 \u00a02021); https:\/\/www.infoworld.com\/article\/2265785\/howcompanies-are-moving-on-from-cobol.html."},{"key":"e_1_3_1_5_2","unstructured":"Crane S. Porting C to Rust for a fast and safe AV1 media decoder. Prossimo Blog (Sep. 9\u00a02024); https:\/\/www.memorysafety.org\/blog\/porting-c-to-rust-for-av1\/"},{"key":"e_1_3_1_6_2","doi-asserted-by":"crossref","unstructured":"Emre M. et al. Aliasing limits on translating C to safe Rust. Proc. ACM Program. Lang. 7 OOPSLA1 (Apr. 2023).","DOI":"10.1145\/3586046"},{"key":"e_1_3_1_7_2","doi-asserted-by":"crossref","unstructured":"Emre M. et al. Translating C to safer Rust. Proc. ACM Program. Lang. 5 OOPSLA (Oct. 2021).\u00a0","DOI":"10.1145\/3485498"},{"key":"e_1_3_1_8_2","unstructured":"Eniser H.F. et al. Towards translating real-world code with LLMs: A study of translating to Rust. arXiv:2405.11514 [cs.SE] (2024); https:\/\/arxiv.org\/abs\/2405.11514"},{"key":"e_1_3_1_9_2","doi-asserted-by":"crossref","unstructured":"Hong J. and Ryu S. Concrat: An automatic C-to-Rust lock API translator for concurrent programs. In Proceedings of the 45th Intern. Conf. on Software Engineering. IEEE Press\u00a0 (2023) 716\u2013728.","DOI":"10.1109\/ICSE48619.2023.00069"},{"key":"e_1_3_1_10_2","doi-asserted-by":"crossref","unstructured":"Hong J. and Ryu S. Don\u2019t write but return: Replacing output parameters with algebraic data types in C-to-Rust translation. Proc. ACM Program. Lang. 8 PLDI (Jun. 2024).","DOI":"10.1145\/3656406"},{"key":"e_1_3_1_11_2","doi-asserted-by":"crossref","unstructured":"Hong J. and Ryu S. To tag or not to tag: Translating C\u2019s unions to Rust\u2019s tagged unions. In Proceedings of the 39th IEEE\/ACM Intern. Conf. on Automated Software Engineering. ACM\u00a0(2024) 40\u201352.","DOI":"10.1145\/3691620.3694985"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-024-10573-2"},{"key":"e_1_3_1_13_2","unstructured":"Hutt T. Would Rust secure cURL? (Jan. 16 \u00a02021); https:\/\/blog.timhutt.co.uk\/curl-vulnerabilities-rust\/"},{"key":"e_1_3_1_14_2","unstructured":"Isaiah A. Rewriting the GNU Coreutils in Rust.\u00a0LWN.net (Jun. 8 \u00a02021); https:\/\/lwn.net\/Articles\/857599"},{"key":"e_1_3_1_15_2","unstructured":"ISO. ISO\/IEC 9899:1999 Programming languages \u2013 C (1999)."},{"key":"e_1_3_1_16_2","doi-asserted-by":"crossref","unstructured":"Jung R. RustBelt: Securing the foundations of the Rust programming language. Proc. ACM Program. Lang. 2 POPL\u00a0(Dec.\u00a02017).","DOI":"10.1145\/3158154"},{"key":"e_1_3_1_17_2","doi-asserted-by":"crossref","unstructured":"Lankes S. Breitbart J. and Pickartz S.\u00a0Exploring Rust for unikernel development.\u00a0In Proceedings of the 10th Workshop on Programming Languages and Operating Systems. ACM\u00a0(2019) 8\u201315.","DOI":"10.1145\/3365137.3365395"},{"key":"e_1_3_1_18_2","unstructured":"Larabel M. The first Rust-written network PHY driver set to land in Linux 6.8.\u00a0Phoronix (Dec. 17 \u00a02023); https:\/\/www.phoronix.com\/news\/Linux-6.8-Rust-PHY-Driver"},{"key":"e_1_3_1_19_2","unstructured":"Lee P. Open sourcing our Go libraries.\u00a0Dropbox.Tech (Jul. 1 \u00a02014); https:\/\/dropbox.tech\/infrastructure\/open-sourcing-our-go-libraries"},{"key":"e_1_3_1_20_2","doi-asserted-by":"crossref","unstructured":"Levy A. et al. Multiprogramming a 64KB computer safely and efficiently. In Proceedings of the 26th Symp. on Operating Systems Principles. ACM\u00a0(2017) 234\u2013251.","DOI":"10.1145\/3132747.3132786"},{"key":"e_1_3_1_21_2","doi-asserted-by":"crossref","unstructured":"Lin Y. et al. Rust as a language for high performance GC implementation.\u00a0In Proceedings of the 2016 ACM SIGPLAN Intern. Symp. on Memory Management. ACM\u00a0\u00a0(2016) 89\u201398.","DOI":"10.1145\/2926697.2926707"},{"key":"e_1_3_1_22_2","doi-asserted-by":"crossref","unstructured":"Matsakis N.D. and Klock F.S.\u00a0The Rust Language. In\u00a0Proceedings of the 2014 ACM SIGAda Annual Conf. on High Integrity Language Technology.\u00a0ACM\u00a0(2014) 103\u2013104.","DOI":"10.1145\/2663171.2663188"},{"key":"e_1_3_1_23_2","unstructured":"Narayanan V. \u00a0et al.\u00a0RedLeaf: Isolation and communication in a safe operating system.\u00a0In Proceedings of the 14th USENIX Conf. on Operating Systems Design and Implementation. USENIX\u00a0(2020)."},{"key":"e_1_3_1_24_2","unstructured":"Nitin V. \u00a0et al.\u00a0C2SaferRust: Transforming C Projects into safer Rust with neurosymbolic techniques. arXiv:2501.14257 [cs.SE] (2025); https:\/\/arxiv.org\/abs\/2501.14257"},{"key":"e_1_3_1_25_2","unstructured":"Office of the National Cyber Director.\u00a0Back to the Building Blocks: A Path Toward Secure and Measurable Software (2024);\u00a0https:\/\/bidenwhitehouse.archives.gov\/wp-content\/uploads\/2024\/02\/Final-ONCD-Technical-Report.pdf"},{"key":"e_1_3_1_26_2","unstructured":"Shetty M. et al. Syzygy: Dual code-test C to (safe) Rust translation using LLMs and dynamic analysis. arXiv:2412.14234 [cs.SE] (2024); https:\/\/arxiv.org\/abs\/2412.14234"},{"key":"e_1_3_1_27_2","unstructured":"Shiraishi M. and Shinagawa T. Context-aware code segmentation for C-to-Rust translation using large language models. arXiv:2409.10506 [cs.SE] (2024); https:\/\/arxiv.org\/abs\/2409.10506"},{"key":"e_1_3_1_28_2","unstructured":"De Simone S. \u00a0Linux 6.1 officially adds support for Rust in the kernel.\u00a0InfoQ (Dec. 20 \u00a02022); https:\/\/www.infoq.com\/news\/2022\/12\/linux-6-1-rust"},{"key":"e_1_3_1_29_2","unstructured":"Thomas G. A proactive approach to more secure code.\u00a0MSRC Blog (Jul. 16 \u00a02019); https:\/\/msrc.microsoft.com\/blog\/2019\/07\/a-proactive-approach-to-more-secure-code\/"},{"key":"e_1_3_1_30_2","unstructured":"Venners B. Twitter on Scala: A conversation with Steve Jenson Alex Payne and Robey Pointer.\u00a0Artima\u00a0(Apr. 3 \u00a02009); https:\/\/www.artima.com\/articles\/twitter-on-scala"},{"key":"e_1_3_1_31_2","unstructured":"Wallach D. \u00a0TRACTOR:\u00a0Translating all C to Rust.\u00a0DARPA (2024); https:\/\/www.darpa.mil\/program\/translating-all-c-to-rust"},{"key":"e_1_3_1_32_2","unstructured":"Yang A.Z.H.\u00a0et al.\u00a0VERT: Verified equivalent Rust transpilation with large language models as few-shot learners. arXiv:2404.18852 [cs.PL] (2024); https:\/\/arxiv.org\/abs\/2404.18852"},{"key":"e_1_3_1_33_2","unstructured":"Yu Y. d\u2019Antras A. and Bui N.D.Q. Our Rust mission at Huawei (2021); https:\/\/trusted-programming.github.io\/2021\/02\/07\/our-rust-mission-at-huawei.html"},{"key":"e_1_3_1_34_2","doi-asserted-by":"crossref","unstructured":"Zhang H. \u00a0et al.\u00a0Ownership guided C to Rust translation.\u00a0In Computer Aided Verification. C. Enea and A. Lal (Eds.). Springer Cham\u00a0\u00a0(2023) 459\u2013482.","DOI":"10.1007\/978-3-031-37709-9_22"}],"container-title":["Communications of the ACM"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3737696","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,29]],"date-time":"2025-10-29T17:57:16Z","timestamp":1761760636000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3737696"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,29]]},"references-count":33,"journal-issue":{"issue":"11","published-print":{"date-parts":[[2025,11]]}},"alternative-id":["10.1145\/3737696"],"URL":"https:\/\/doi.org\/10.1145\/3737696","relation":{},"ISSN":["0001-0782","1557-7317"],"issn-type":[{"value":"0001-0782","type":"print"},{"value":"1557-7317","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,10,29]]},"assertion":[{"value":"2025-01-17","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-29","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}