← All repos

corrode

C to Rust translator

Browse cluster: Cluster 21
411commits
23contributors
4languages

Tech stack & purpose

Corrode is an automatic translator that converts C source code to semantically equivalent Rust code, designed to assist in migrating legacy C programs. The tool reads C files and outputs Rust modules that preserve the original behavior and ABI compatibility, though users are expected to refine the output afterward to use Rust idioms appropriately. It is written in Haskell and uses the Cabal or Stack build systems, relying on tools like happy and alex for parsing. The project was created by Jamey Sharp and is tested using randomly generated C programs via csmith to verify that the translated Rust code compiles correctly and maintains equivalence with the original C.

Community & reference links

Languages

Haskell
68.2%
Python
25.4%
Batchfile
5.2%
Makefile
1.2%

Contributors