Would a WASM backend for cranelift make sense at all? I was thinking about using cranelift for a bootstrapping project of mine
Yes :) https://github.com/bytecodealliance/wasmtime/issues/2566 Also see https://github.com/cfallin/waffle which may be useful in implementing such backend.
Have there been any updates on this in the last few months?
nope, no one has written a Wasm backend for CL or is working on it to my knowledge; anyone who wants to is encouraged to comment on the issue above
https://github.com/rust-lang/rustc_codegen_cranelift/blob/waffle/src/driver/wasm.rs has a very bare bones wasm backend.
I will do it once I'm done with the winch aarch64 implementation :smile:
I was going to say I can make a bit of an attempt over next month or so but would definitely be the largest contribution to cranelift I’ve really tried to do
https://github.com/bytecodealliance/wasmtime/pull/9089 is a relatively recent example of what adding a new backend to cranelift looks like
Looking at isle instructions, I guess most of this set corresponds to MInsts of the wasm virtual machine https://webassembly.github.io/spec/core/appendix/index-instructions.html
Last updated: Nov 22 2024 at 17:03 UTC