Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if this can compile to wasm... #2

Open
ctzurcanu opened this issue May 20, 2020 · 3 comments
Open

if this can compile to wasm... #2

ctzurcanu opened this issue May 20, 2020 · 3 comments

Comments

@ctzurcanu
Copy link

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.

@dubek
Copy link
Owner

dubek commented May 20, 2020

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).

@ctzurcanu
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@dubek @ctzurcanu and others