Build of lib/js fails
Thesola10 opened this issue · comments
I cannot build embla
in my project because lib/js
in it gives the following build errors:
Compiling js v0.1.0 (https://github.com/Healthire/embla?rev=ade4d96#ade4d96d)
error[E0277]: the trait bound `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>: wasm_bindgen::convert::IntoWasmAbi` is not satisfied
--> /home/karim/.cargo/git/checkouts/embla-fd159dc8508b2a14/ade4d96/lib/js/src/lib.rs:21:1
|
21 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `wasm_bindgen::convert::IntoWasmAbi` is not implemented for `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
|
= help: the following implementations were found:
<std::boxed::Box<[f32]> as wasm_bindgen::convert::IntoWasmAbi>
<std::boxed::Box<[f64]> as wasm_bindgen::convert::IntoWasmAbi>
<std::boxed::Box<[i16]> as wasm_bindgen::convert::IntoWasmAbi>
<std::boxed::Box<[i32]> as wasm_bindgen::convert::IntoWasmAbi>
and 9 others
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>: wasm_bindgen::convert::FromWasmAbi` is not satisfied
--> /home/karim/.cargo/git/checkouts/embla-fd159dc8508b2a14/ade4d96/lib/js/src/lib.rs:21:1
|
21 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `wasm_bindgen::convert::FromWasmAbi` is not implemented for `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
|
= help: the following implementations were found:
<std::boxed::Box<[f32]> as wasm_bindgen::convert::FromWasmAbi>
<std::boxed::Box<[f64]> as wasm_bindgen::convert::FromWasmAbi>
<std::boxed::Box<[i16]> as wasm_bindgen::convert::FromWasmAbi>
<std::boxed::Box<[i32]> as wasm_bindgen::convert::FromWasmAbi>
and 9 others
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.
error: could not compile `js`.
To learn more, run the command again with --verbose.
Can it be fixed, or the wasm_bindgen
version frozen if it is caused by a library incompatibility?
Hi,
This library was mostly experimental and uses a really old wasm-bindgen version. It's probably just not compatible with newer wasm-bindgen anymore. I wouldn't recommend using it. Maybe check out https://github.com/ryanisaacg/quicksilver as I think that has a focus on the web build?