Closed langyo closed 1 year ago
Can you make it use
cfg(target_os = "wasi")
instead of a featureThat should make the
wasi
feature unnecessary and handle the compilation accordingly. Other than that, it looks good.It would be great if you could also update CI to run tests on WASI target (using wasmtime) though
It's so new that when I looked through the documentation, it didn't even mention that the value of target_os
can be wasi
...
I tested it on the latest stable compiler and it works. I'll push the modified version later.
I've been trying to use
yew
to render the page into the static HTML string on WASI. However,gloo-history
cannot distinguish the browser WASM target (wasm32-unknown-unknown
withwasm-bindgen
) and WASI target (wasm32-wasi
), and it would choose wrong functions forwasm32-*
.I have fixed it by using
target_os
, and it would fix the problem.