3 ms·
I would love to see this too, but it's not going to happen until Rust is as portable as C, which won't happen until it compiles to C, IMO.
by haberman 12y ago
I would love to see this too, but it's not going to happen until Rust is as portable as C, which won't happen until it compiles to C, IMO.
- puetzk 12y agoI suspect you can have this already exists if you want it bat enough, given that rust generates llvm bitcode, and there is an llvm-cbe "target" architecture that just generates C. The results probably won't be well-optimized, though; C isn't actually very portable at this level, there's too much implementation-defined behavior that needs to be taken into account. You'll probably spend as much effort trying to robustly handle the quirks and deficiencies of some obscure platform's compiler than doing an LLVM backend for the processor...
- jevinskie 12y agoThe LLVM C backend was removed in LLVM 3.1. But the Monster has been reanimated by [0]/[1]! I wonder if anyone has updated the Cell SPU backend that was eventually removed. That is one of my favorite architectures. =) [0]: https://github.com/draperlaboratory/llvm-cbe https://github.com/draperlaboratory/llvm-cbe [1]: http://thread.gmane.org/gmane.comp.compilers.llvm.devel/75943/ http://thread.gmane.org/gmane.comp.compilers.llvm.devel/7594...