Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just that Rust is limited to the architectures Clang supports (I don't think we will see people writing competing Rust implementations in their weekends like its possible to do with C). Clang can generate code for lots of architectures but its still a limitation when compared to C's universality. :)


It's actually LLVM, not Clang (which also uses LLVM).

Yes, it would be a tremendous amount of work to write a Rust compiler from scratch, but you can also write a LLVM backend. Not in a weekend, but it's possible. Bonus points for having both rustc and Clang work with it.

Alternatively, once the MIR (Mid-level rust IR) work is done, you will be able to write your own lowering code from that to, say, PIC assembly.

It won't be optimized and you'll probably output a lot of code (compared to a fully featured GCC backend at -Os), but you would be able to do it in a weekend.


Cool, that's fair. Hopefully someday we will get compilers for more esoteric architectures; we're trying to not tie behavior to LLVM specifically where it doesn't make sense to.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: