This sounds really neat. Do you have an open source repo for this? Would love to check it out. What framework are you using to write the compiler itself? LLVM, or something else?
I'm not using any frameworks. Took a bit to figure out code generating wasm, but once I got the basic emitter/IR working it got a little easier. Plus you start being able to read the binary format after a bit of practice.