This sounds cool in theory, but would be extremely hard to pull off in any kind of meaningful fashion I think simply because Rust is just too different from C. You can probably make something to very roughly “transpile” C to Rust, but the Rust code that is generated probably wouldn’t be good and will probably be a pain to work with simply because it’d end up being a mess and at that point, if you’re going to have to end up refactoring a ton of generated code, you may as well just rewrite it yourself so it is actually half decent code.
Also considering that a lot of this C code is going to be extremely critical code pathways, like making sure your banks don’t collapse and your energy plants don’t blow up, the major pain paths for migrating to another language are going to be rigorously testing every last path through it, not rewriting it.
Your bank runs on COBOL and your energy plants run on one of a family of PLC (programmable logic controller) languages. Most of the critical path in your day-to-day that runs C is the gaping security hole that is the internet.
This sounds cool in theory, but would be extremely hard to pull off in any kind of meaningful fashion I think simply because Rust is just too different from C. You can probably make something to very roughly “transpile” C to Rust, but the Rust code that is generated probably wouldn’t be good and will probably be a pain to work with simply because it’d end up being a mess and at that point, if you’re going to have to end up refactoring a ton of generated code, you may as well just rewrite it yourself so it is actually half decent code.
Also considering that a lot of this C code is going to be extremely critical code pathways, like making sure your banks don’t collapse and your energy plants don’t blow up, the major pain paths for migrating to another language are going to be rigorously testing every last path through it, not rewriting it.
Your bank runs on COBOL and your energy plants run on one of a family of PLC (programmable logic controller) languages. Most of the critical path in your day-to-day that runs C is the gaping security hole that is the internet.