Skip to content

Commit 24e0783

Browse files
committed
fix: wasm packaging error
1 parent f263bc4 commit 24e0783

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

wasm-edge/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,14 @@ features = [
2626
# the JS globalThis.crypto backend (pulled transitively via rand in core-engine).
2727
[target.'cfg(target_arch = "wasm32")'.dependencies]
2828
getrandom = { version = "0.3", features = ["wasm_js"] }
29+
30+
# Recent Rust toolchains emit newer wasm features (bulk-memory, nontrapping
31+
# float-to-int, …) that the older `wasm-opt` wasm-pack downloads rejects during
32+
# validation. Disabling wasm-opt avoids the version mismatch entirely; the
33+
# release build is already optimized by rustc's release profile, so the size
34+
# difference is small. Re-enable with an up-to-date wasm-opt if desired.
35+
[package.metadata.wasm-pack.profile.release]
36+
wasm-opt = false
37+
38+
[package.metadata.wasm-pack.profile.profiling]
39+
wasm-opt = false

0 commit comments

Comments
 (0)