It's interesting that booleans are stored as 0 or -1 [1]. I wonder what drove that decision. I just checked, and Rust's LLVM stores booleans as 0 or 1.<p>[1] <a href="https://cranelift.readthedocs.io/en/latest/ir.html#boolean-types" rel="nofollow">https://cranelift.readthedocs.io/en/latest/ir.html#boolean-t...</a>
The README says:<p>"Cranelift is designed to be a code generator for WebAssembly, but it is general enough to be useful elsewhere too. The initial planned uses that affected its design are:<p>WebAssembly compiler for the SpiderMonkey engine in Firefox.
Backend for the IonMonkey JavaScript JIT compiler in Firefox.
Debug build backend for the Rust compiler."
Does it, or are there plans to, translate the IR to WASM (i.e. a WASM backend instead of just frontend)? This seems to have a more expressive set of instructions than WASM and could be a good target for compilers.
I understand the enthusiasm for Rust, but I'm growing tired of these project advertised as "written in Rust" like it proves a point in itself.