immunant/c2rust ? reverse-engineered prompt
Reverse engineered prompt
Build me a command line tool that helps migrate an existing C99 codebase to Rust.
I want to point it at a compile_commands.json file or a set of C and header files, and have it generate Rust code that keeps the program behavior as close as possible to the original. The first pass can be unsafe and not very pretty, but it should be reliable and keep the test suite passing. After that, I want built in cleanup steps that can rename things, simplify the generated code, and do a final pass for harder refactors with some validation. It would also be great if it could compare the translated Rust against the original C so I can catch mistakes early.
Make it feel like a real migration workflow, with good docs and useful commands for each step. If you need current details, look up the latest docs online while you work.