4 ms·
We used to call fortran transpired into ada: adatran. Adatran was terrible. Hard to impossible to edit if something needed fixing. Used none of the features
by acomjean 5y ago
We used to call fortran transpired into ada: adatran.
Adatran was terrible. Hard to impossible to edit if something needed fixing. Used none of the features that made Ada a decent language. The very limited code they did this to did work however. This was a huge project and included C and ada code.
What do we call C code transpiled to Rust. Crust?
- pcwalton 5y ago> What do we call C code transpiled to Rust. Crust? Fun fact: in ancient Rust, what we now call extern "C" functions were called "crust" functions, pronounced like the word.
- hunterb123 5y agoRust devs are commonly called Rustaceans, so users of this transpiler could circle back to the term Crustaceans.
- deltaonefour 5y agoThink of the transpiled code as a compiled binary. Have your build system be able to recognize both languages. So developers work in C and Rust, but they don't actually work in transpiled rust. I guess this is similar to using the FFI.
- drran 5y agoYep. https://github.com/NishanthSpShetty/crust https://github.com/NishanthSpShetty/crust CRUST C/C++ to Rust Transpiler
- mjcohen 5y agoMany years ago, I used the f2c fortran to c translator. It worked, but produced godawful code. I removed about 75% of the c to get usable code.
- masklinn 5y agoYou’re misunderstanding the c2rust project though. Just like Walter above is. The goal of c2rust is not “regularly compile C to Rust and keep compiling that garbage”. The goal of c2rust is “migrate a C codebase to Rust”. That is the tagline of the Git repository, as well as the title of the RustConf 2018 presentation linked in TFA. The idea is that you convert the entire thing to working (but unsafe and C-equivalent) Rust, then have your entire build pipeline and tooling ready to chip at it and perform the conversion to safe rust, as an alternative to performing the conversion piecemeal and having a C/Rust boundary which you have to keep moving about, and duplicated definitions for the interop.
- raverbashing 5y agoAaah that makes more sense Because the translation, while it works, is awful Now, translating everything and then going function by function seems better