It does not attempt to help you refactor the C code, but it is still a great way to call your C library from Rust while you are in the process of refactoring. It can also work with `no_std` environments with a bit of configuring.
I really, _really_ want the opposite of this. Generating C from Rust, so that I can compile it for platforms which have no prayer of getting Rust support anytime soon or where a specific certified C toolchain has to be used.
https://rust-lang.github.io/rust-bindgen/
It does not attempt to help you refactor the C code, but it is still a great way to call your C library from Rust while you are in the process of refactoring. It can also work with `no_std` environments with a bit of configuring.