Skip to content

Commit a9aa0cc

Browse files
committed
using cargo version of wasm opt instead of npx
1 parent 5195007 commit a9aa0cc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/cli/src/lib/defaults/build-strategies/wasm/rust/local

packages/cli/src/lib/defaults/build-strategies/wasm/rust/local/local.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ cargo install wasm-bindgen-cli
1515
# Install wasm-tools
1616
cargo install wasm-tools
1717

18+
# Install wasm-opt
19+
cargo install wasm-opt
20+
1821
# Ensure the module at {{dir}} has the crate-type = ["cdylib"]
1922
toml set "$1"/Cargo.toml lib.crate-type ["cdylib"] > "$1"/Cargo-local.toml && \
2023
mv "$1"/Cargo.toml "$1"/Cargo-bak.toml && \
@@ -56,5 +59,5 @@ rm -rf "$2"/strip_module.wasm
5659

5760
# Use wasm-opt to perform the "asyncify" post-processing step over all modules
5861
export ASYNCIFY_STACK_SIZE=24576
59-
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
6063
rm -rf "$2"/snipped_module.wasm

0 commit comments

Comments
 (0)