Closed jgarvin closed 4 years ago
the web-sys feature is when using wasm-bindgen, which is incompatible with cargo web.
Either use cargo web with the stdweb
feature or use wasm-bindgen with the web-sys
feature.
I will definitely give this a try tomorrow. Is there any way to make mismatching it give an error message? You'll get fewer clueless questions from people like me ;)
Sorry I figured there'd be a separate command for wasm-bindgen, but the readme says it's not documented yet. I tried looking through some tutorials but it's not trivial to map them to the example, e.g. they seem to want the code to live in a library instead of a binary, and assume you want to use a full node-js install. I think I'll revisit in the future.
Describe the bug Try running the squares example, with
cargo web start --release --auto-reload --features quicksilver/stdweb
you get a blue rectangle, withcargo web start --release --auto-reload --features quicksilver/web-sys
you get an empty page.To Reproduce Copy the squares demo to main.rs, add quicksilver dep, then run
cargo web start --release --auto-reload --features quicksilver/web-sys
and visit in Chrome.Environment and versions (please complete the following information):