wasm-bindgen-rayon: Missing file in pkg/snippets folder with wasm-bindgen upgrade
Hello,
When I use wasm-bindgen-rayon v1.2.2 along with wasm-bindgen >= v0.2.94, the pkg/snippets is not fully populated comparing to run with wasm-bindgen v0.2.93.
To reproduce
- clone zama-ai/tfhe-rs repository
- run
make build_web_js_api_paralleland check content oftfhe/pkg/snippets/wasm-bindgen-rayon-<hash>/src - change version constraint for wasm-bindgen to
0.2.95 - remove tfhe/pkg folder
- run again
make build_web_js_api_paralleland check content oftfhe/pkg/snippets/wasm-bindgen-rayon-<hash>/src-> you’ll see thatworkerHelpers.worker.jsfile is missing
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (7 by maintainers)
Ok I published this workaround with wasm-bindgen bump as 1.3.0, hopefully this fixes the issue for now.
This will only help, if wasm-pack released a new version. Then propably you can invoke
wasm-pack build --split-linked-modulecommand to get wasm-bindgen-rayon@1.2.2 working.I will try to test the latest main commit from wasm-bindgen-rayon with the old approach in my project.
I’m going to wait for feedback for now - couple of days aren’t going to change anything. I’d rather issue a fix without pinning if it does work.
Slightly worse code splitting, so can impact initialization time a bit, but that’s relatively imperceptible.
The worse issue is that it used to break hard in some bundlers (eg Parcel), failing at compile time, but now that the new approach is broken everywhere, figured might be worth a try. Seems to pass on the CI nowadays, but personal feedback would be welcome before I make a release.