You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running wasm-pack with experimental WASM code coverage in release mode, the tests fail to run. The browser outputs the following:
Uncaught (in promise) CompileError: WebAssembly.instantiateStreaming(): Duplicate export name 'closure541_externref_shim' for function 2118 and function 2119 @+11708
This does not occur in Debug, so I'm assuming it's one of the optimisations that are occurring. I assume wasm-opt isn't being run by wasm-pack test, even though it builds the application too, as running wasm-pack build explicitly states that it does (and has the --no-opt switch).
There are no explicitly set release flags.
I noted that the docs say that wasm-opt is enabled by default in the release profile, but I added the following to my Cargo.toml, and the output binary was no different.
# `wasm-opt` is on by default in for the release profile, but it can be# disabled by setting it to `false`
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
🤔 Expected Behavior
WASM should not duplicate export names, and tests run successfully.
👟 Steps to reproduce
Command being run: RUSTFLAGS='-Cinstrument-coverage -Zno-profiler-runtime --emit=llvm-ir --cfg=wasm_bindgen_unstable_test_coverage' wasm-pack test --release --chrome
🌍 Your environment
Include the relevant details of your environment.
wasm-bindgen-test version: 0.3.42
wasm-pack version: 0.13.1 (as installed by wasm-bindgen-test)
rustc version: nightly-2025-01-06-x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered:
🐛 Bug description
When running
wasm-pack
with experimental WASM code coverage in release mode, the tests fail to run. The browser outputs the following:This does not occur in Debug, so I'm assuming it's one of the optimisations that are occurring. I assume
wasm-opt
isn't being run bywasm-pack test
, even though it builds the application too, as runningwasm-pack build
explicitly states that it does (and has the--no-opt
switch).There are no explicitly set release flags.
I noted that the docs say that
wasm-opt
is enabled by default in the release profile, but I added the following to myCargo.toml
, and the output binary was no different.🤔 Expected Behavior
WASM should not duplicate export names, and tests run successfully.
👟 Steps to reproduce
Command being run:
RUSTFLAGS='-Cinstrument-coverage -Zno-profiler-runtime --emit=llvm-ir --cfg=wasm_bindgen_unstable_test_coverage' wasm-pack test --release --chrome
🌍 Your environment
Include the relevant details of your environment.
wasm-bindgen-test version: 0.3.42
wasm-pack version: 0.13.1 (as installed by wasm-bindgen-test)
rustc version: nightly-2025-01-06-x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: