It&#x27;s actually LLVM, not Clang (which also uses LLVM).<p>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&#x27;s possible. Bonus points for having both rustc and Clang work with it.<p>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.<p>It won&#x27;t be optimized and you&#x27;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.