3 ms·
Really cool concept! (Rust is my favorite language for tinkering; I haven't touched C since I was in school.) What would really help is success stories: Who's
by gwbas1c 4y ago
Really cool concept! (Rust is my favorite language for tinkering; I haven't touched C since I was in school.)
What would really help is success stories: Who's used it? What have they used it for? What challenges did they encounter? Then again, maybe this is so new that there aren't a lot of success stories yet. :)
- mastax 4y agoFrom what I remember it was primarily funded by a DoD project of some sort. There probably isn't a lot of info about that. There have been a few conference talks or blogposts about it (I'm trying to remember) that talked about the process of using it.
- mshockwave 4y agoIt’s actually funded by DARPA so basically everything in this project is public available.
- dtolnay 4y agoI used it with great success for transpiring libyaml from C to Rust. I even set up Miri to run the upstream library's entire transpiled test suite, and the fact it passes is validation of absence of UB in the original C code. The transpiled library now serves as the YAML backend for the widely used serde_yaml crate. Having serde_yaml be pure-Rust code instead of linking C is advantageous for painless cross-compilation as well as making downstream projects runnable in Miri. https://github.com/dtolnay/unsafe-libyaml https://github.com/dtolnay/unsafe-libyaml
- pitaj 4y agoVery cool. Miri is seriously awesome.
- tialaramex 4y agoA few questions, if I may: Is the intent that this continues to evolve by newer libyaml code getting transpiled, or that it's effectively a fork and might gradually become more idiomatic Rust which does the same job as the C but won't track any changes? Or is this basically "done" and only small changes (to both this code and the C libyaml) are anticipated anyway? The c2rust documentation cautions that any platform independence isn't preserved, so if libyaml has types which are different on platform A versus platform B, the c2rust transpilation on platform A just gives you Rust types for platform A, losing that independence, was this an issue for libyaml ?