
Corrode: Automatic semantics-preserving translation from C to Rust - JoshTriplett
https://github.com/jameysharp/corrode/
======
nickpsecurity
Good submission, Josh. One of the proposals I had for developing robust,
server software & tools was to code them in several languages simultaneously
to leverage their differing tooling for catching bugs. Ada/SPARK for static
stuff, Rust for dynamic/concurrency, and C for deployment + a crapload of
analysis tools. Better to have automated ways of producing one from the other
as manual translations often introduce errors.

This tool, particularly use No 2, seems like a nice step in that direction. My
original model was to use something like Racket to code in a superset that had
features of all those languages in syntax with blocks at bottom with extra
annotations that were language-specific. Like types, contracts, etc. Then, one
tool per language parses that whole thing, ignores anything not relevant, and
straight-up synthesizes code for target language. Could always just plug in
more if necessary. I figured it would be easier than semantics-preserving
translation of languages not designed for it.

Of course, gotta consider alternative routes as I figured people might not
learn Racket, LISP, Nim, or anything else conducive to that. Hence, keeping my
eye on components like this.

