Closed surma closed 4 years ago
After taking a closer look, I am now aware that you are using rayon
, which probably also poses a challenge for the WebAssembly target. Not sure how feasible it is to make rayon
optional? 🤔
If you write a rayoff
crate that exposes same methods, but serial, then I'll add it as an option.
I've published lib-only crate https://lib.rs/dssim-core
I've published lib-only crate lib.rs/dssim-core
That’s incredibly helpful. Thanks for that. I do like the idea of rayoff
;)
Turns out, rayon
already compiles against wasm. I am somewhat confident that your split just solved the entire problem.
Testing that now…
Yup. This is all I needed. This library can now be used in WebAssembly 🎉 Thanks for the ultra-quick turnarnound!
The
dssim
CLI depends on theload_image
crate which in turn relies on multiple*-sys
crates. This makes compilation to WebAssembly fail. I am not sure whycrate
is compiling the CLI when I am only using it as a library, but it is.Would it be feasible to separate the CLI and library into separate crates? Or maybe another solution is to put the CLI behind a (default-enabled) feature?