3 ms·
That's awesome work, thank you! I'm wondering if MIR will make it possible to replace the backend IR. For instance, to use WebAssembly instead of LLVM IR. Or
by nbaksalyar 10y ago
That's awesome work, thank you!
I'm wondering if MIR will make it possible to replace the backend IR. For instance, to use WebAssembly instead of LLVM IR.
Or is it still a better idea to base it off of LLVM?
- steveklabnik 10y agoYes, in theory, you could write a new backend that uses MIR. Miri, linked at the end of the post[1], is an example: it interprets MIR, rather than using LLVM to generate machine code. 1: https://github.com/tsion/miri https://github.com/tsion/miri
- eddyb 10y agoThere is discussion of a WebAssembly backend which lowers MIR directly, see https://github.com/rust-lang/rust/issues/33205 https://github.com/rust-lang/rust/issues/33205.