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.
This crate currently seems to use
cfg(target_arch = "wasm32")in order to mean "the web".However,
wasm32-wasiis 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-wasiyields errors aboutJsValuenot being found.I would suggest using
target_os = "emscripten"rather thantarget_arch = "wasm32"for everything Emscripten-related, and treattarget_os = "wasi"in a cross-platform manner.