malc
malc copied to clipboard
if this can compile to wasm...
It would be very useful to have in the documentation the steps for compiling to wasm. Not a lot of people know/use LLVM IR.
LLVM has a wasm backend; so supposedly the .ll files generated by malc can be compiled to wasm instead of to x86_64 assembly. I haven't tried this. However, with wasm you need to properly declare the I/O interface - stat, puts, open, read, etc. There's a wasm library for handling this (WASI) but I haven't tried this yet. Let me know if you succeed compiling with malc to wasm (w/ WASI).
I do not know how to do that and that is why I wanted to learn from your documentation :) If I will get to know before you change the docs, I will get back to this.