We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5195007 commit a9aa0ccCopy full SHA for a9aa0cc
1 file changed
packages/cli/src/lib/defaults/build-strategies/wasm/rust/local/local.sh
@@ -15,6 +15,9 @@ cargo install wasm-bindgen-cli
15
# Install wasm-tools
16
cargo install wasm-tools
17
18
+# Install wasm-opt
19
+cargo install wasm-opt
20
+
21
# Ensure the module at {{dir}} has the crate-type = ["cdylib"]
22
toml set "$1"/Cargo.toml lib.crate-type ["cdylib"] > "$1"/Cargo-local.toml && \
23
mv "$1"/Cargo.toml "$1"/Cargo-bak.toml && \
@@ -56,5 +59,5 @@ rm -rf "$2"/strip_module.wasm
56
59
57
60
# Use wasm-opt to perform the "asyncify" post-processing step over all modules
58
61
export ASYNCIFY_STACK_SIZE=24576
-npx wasm-opt --asyncify -Os "$2"/snipped_module.wasm -o "$2"/wrap.wasm
62
+wasm-opt --asyncify -Os "$2"/snipped_module.wasm -o "$2"/wrap.wasm
63
rm -rf "$2"/snipped_module.wasm
0 commit comments