From cb6812ffa2e5499621970d80b5988240329467d7 Mon Sep 17 00:00:00 2001 From: ChanTsune <41658782+ChanTsune@users.noreply.github.com> Date: Fri, 23 Aug 2024 00:04:21 +0900 Subject: [PATCH] :construction_worker: Add test target wasm32-unknown-emscripten --- .github/workflows/webassembly.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.yml index 0f42285c..ec74c8a7 100644 --- a/.github/workflows/webassembly.yml +++ b/.github/workflows/webassembly.yml @@ -64,6 +64,8 @@ jobs: fail-fast: false matrix: include: + - target: wasm32-unknown-emscripten + container: emscripten/emsdk:latest - target: wasm32-wasip1 container: ghcr.io/portable-network-archive/wasi-sdk-gh-actions:wasi-sdk-24 # - target: wasm32-wasip1 @@ -78,7 +80,16 @@ jobs: with: target: ${{ matrix.target }} toolchain: nightly - - uses: bytecodealliance/actions/wasmtime/setup@v1 + - name: Setup wasmtime + if: ${{ startsWith(matrix.target, 'wasm32-wasi') }} + uses: bytecodealliance/actions/wasmtime/setup@v1 - name: Run on wasmtime + if: ${{ startsWith(matrix.target, 'wasm32-wasi') }} run: | cargo run -p portable-network-archive --target ${{ matrix.target }} --release -- --help + - name: Run on Node.js + if: ${{ startsWith(matrix.target, 'wasm32-unknown-emscripten') }} + run: | + cargo run -p portable-network-archive --target ${{ matrix.target }} --release -- --help + env: + RUSTFLAGS: "-C link-arg=-sINITIAL_MEMORY=512MB -C link-arg=-sTOTAL_STACK=16MB"