cargo-web: `unsupported custom section: '__wasm_bindgen_unstable'`

Not sure if I have something configured wrong, but I get this error all the time

> cargo web build --release
    Finished release [optimized] target(s) in 0.23 secs
    Garbage collecting "yew_test.wasm"...
    Processing "yew_test.wasm"...
thread 'main' panicked at 'unsupported custom section: '__wasm_bindgen_unstable'', src\wasm_context.rs:646:25
note: Run with `RUST_BACKTRACE=1` for a backtrace.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 2
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Hi @koute! Can we expect progress on this in the near future? ) I would love to see both cargo-web and wasm-bindgen in my project!

P.S. Now it fails not during the building process, but on opening the web page: Error loading Rust wasm module 'wasm_bindgen_cargo_web': TypeError: WebAssembly Instantiation: Import #0 module="__wbindgen_placeholder__" error: module is not an object or function

Supporting wasm-bindgen would be wonderful! It took me a while to debug the situation and realize this isn’t supported . Maybe put a note to the readme?

Ah, right. wasm-bindgen won’t work will cargo-web right now; I wouldn’t be against making it work in the future though. (This would need some integration work as right now both wasm-bindgen and cargo-web generate their own .js shims under wasm32-unknown-unknown.)