Okay, the tutorials from here aren’t enough to understand how to compile to WASM: https://developer.mozilla.org/en-US/docs/WebAssembly
and I don’t feel like reading all of that right now: https://webassembly.github.io/spec/core/ (that’s not even counting the extensions)
So whatever, I’ll leave WASM for now and try native compilation instead.
QBE seems a lot more understandable https://c9x.me/compile/doc/il.html
Though it’s a bummer that there aren’t any atomic and vector instructions (?)
It’s not like I need any of that right now, but it bugs me that if I start with QBE I’m going to hit a ceiling sooner or later.
Maybe it would be easy to move to LLVM later since it’s also SSA, or maybe even contribute some code to QBE myself? I don’t have anything to test the risc64 backend though.
I should probably start actually doing something instead of screwing around and poring over possibilities.