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

Support for wasm32-wasi #162

Open
tomaka opened this issue Dec 26, 2020 · 1 comment
Open

Support for wasm32-wasi #162

tomaka opened this issue Dec 26, 2020 · 1 comment

Comments

@tomaka
Copy link

tomaka commented Dec 26, 2020

This crate currently seems to use cfg(target_arch = "wasm32") in order to mean "the web".
However, wasm32-wasi is meant to be an actual operating-system-like environment. The WASI SDK for example provides a clang toolchain that can compile C/C++ code.
Trying to compiling this crate for wasm32-wasi yields errors about JsValue not being found.

I would suggest using target_os = "emscripten" rather than target_arch = "wasm32" for everything Emscripten-related, and treat target_os = "wasi" in a cross-platform manner.

@grovesNL
Copy link
Owner

Sounds good to me 👍

Emscripten is only used when compiling C++ part for the web (e.g. using emcc directly, not going through rustc), but wasm32-unknown-unknown is used for the rest. I guess we could specify the wasm32-unknown-unknown triple to make wasm32-wasi work too but I haven't experimented much with wasi yet.

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

2 participants