polywrap / wrap-cli

Used to create, build, and integrate wraps.
https://polywrap.io
MIT License
170 stars 52 forks source link

fix: properly remove wasm-bindgen from rust wasm modules #1796

Closed dOrgJelli closed 1 year ago

dOrgJelli commented 1 year ago

NOTE: the main difference is when we call wasm-snip we explicitly instruct it to remove the nefarious wasm-bindgen import that remains, even if no other wasm-bindgen imports are being used. wasm-snip input.wasm -o output.wasm -p .*__wbindgen_throw

I've tested this using the ethers-core wrap, which was experiencing a problem of having left-over wasm-bindgen imports, and this fix is fully functional from my testing.

dOrgJelli commented 1 year ago

NOTE: @cbrzn is investigating wrap-test-harness CI issues