Security News > 2024 > August > DARPA suggests turning old C code automatically into Rust – using AI, of course

DARPA suggests turning old C code automatically into Rust – using AI, of course
2024-08-03 10:03

It's a DARPA project that aims to develop machine-learning tools that can automate the conversion of legacy C code into Rust.

"You can go to any of the LLM websites, start chatting with one of the AI chatbots, and all you need to say is 'here's some C code, please translate it to safe idiomatic Rust code,' cut, paste, and something comes out, and it's often very good, but not always," said Dan Wallach, DARPA program manager for TRACTOR, in a statement.

"The large amount of C code running in today's internet infrastructure makes the use of translation tools attractive," Josh Aas, executive director of the Prossimo project, told The Register on Thursday.

Peter Morales, CEO of Code Metal, a company that just raised $16.5 million to focus on transpiling code for edge hardware, told The Register the DARPA project is promising and well-timed.

"Another challenge is that C allows code to do things with pointers, including arithmetic, which Rust forbids. Bridging that gap requires more than just transliterating from C to Rust.".

Asked whether DARPA has any particular codebases in mind for conversion, Wallach said, "I'd point to the large world of open source code, and just as well, all the code used across the defense industrial base. I don't have any specific plans, although some things like the Linux kernel are explicitly out of scope, because they've got technical issues where Rust wouldn't fit."


News URL

https://go.theregister.com/feed/www.theregister.com/2024/08/03/darpa_c_to_rust/