Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/npm-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ concurrency:
jobs:
stage:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
id-token: write
Expand Down
4 changes: 3 additions & 1 deletion d2js/js/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ if [ -n "${NPM_VERSION:-}" ]; then
# Optimize with wasm-opt if available
if command -v wasm-opt >/dev/null 2>&1; then
echo "Optimizing WASM with wasm-opt..."
sh_c "wasm-opt -Oz --enable-bulk-memory-opt main.wasm -o main.wasm"
# -Oz can use quadratic memory on large Go WASM modules.
# https://github.com/WebAssembly/binaryen/issues/7644
sh_c "wasm-opt -O2 --enable-bulk-memory-opt main.wasm -o main.wasm"
else
echo "wasm-opt not found, skipping optimization (install with: brew install binaryen)"
fi
Expand Down
Loading