Skip to content

Commit bcabe03

Browse files
authored
Build a WASI release binary in CI (#1477)
This commit adds to the list of release binaries created in CI to publish a wasm32-wasi binary alongside the others. I don't expect it to be used that often but it's a neat showcase.
1 parent b97de97 commit bcabe03

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- build: aarch64-linux
3333
os: ubuntu-latest
3434
target: aarch64-unknown-linux-gnu
35+
- build: wasm32-wasi
36+
os: ubuntu-latest
37+
target: wasm32-wasi
3538
steps:
3639
- uses: actions/checkout@v4
3740
with:
@@ -40,6 +43,7 @@ jobs:
4043
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
4144
with:
4245
name: ${{ matrix.build }}
46+
if: matrix.build != 'wasm32-wasi'
4347
- run: |
4448
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
4549
rustup target add ${{ matrix.target }}

ci/build-tarballs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ fmt=tar
1919
if [ "$platform" = "x86_64-windows" ]; then
2020
cp target/release/wasm-tools.exe tmp/$bin_pkgname
2121
fmt=zip
22+
elif [ "$target" = "wasm32-wasi" ]; then
23+
cp target/wasm32-wasi/release/wasm-tools.wasm tmp/$bin_pkgname
2224
elif [ "$target" = "" ]; then
2325
cp target/release/wasm-tools tmp/$bin_pkgname
2426
else

0 commit comments

Comments
 (0)