Skip to content

Commit dc5edda

Browse files
committed
a bit more interesting wasm demo
Signed-off-by: Connor Tsui <[email protected]>
1 parent cd80330 commit dc5edda

File tree

9 files changed

+918
-178
lines changed

9 files changed

+918
-178
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -646,15 +646,24 @@ jobs:
646646
- uses: ./.github/actions/setup-rust
647647
with:
648648
repo-token: ${{ secrets.GITHUB_TOKEN }}
649-
toolchain: nightly-2025-06-26
650-
targets: "wasm32-wasip1"
651-
components: "rust-src"
649+
targets: "wasm32-wasip1,wasm32-unknown-unknown"
650+
651+
# WASI test with Wasmer (stable Rust, no -Zbuild-std needed)
652652
- name: Setup Wasmer
653653
uses: wasmerio/[email protected]
654-
# there is a compiler bug in nightly (but not in nightly-2025-06-26)
655-
- run: cargo +nightly-2025-06-26 -Zbuild-std=panic_abort,std build --target wasm32-wasip1
654+
- name: Build WASI binary
655+
run: cargo build --target wasm32-wasip1
656+
working-directory: ./wasm-test
657+
- name: Run WASI test
658+
run: wasmer run ./target/wasm32-wasip1/debug/wasm-test.wasm
656659
working-directory: ./wasm-test
657-
- run: wasmer run ./target/wasm32-wasip1/debug/wasm-test.wasm
660+
661+
# wasm-bindgen-test with headless browser
662+
# wasm-pack automatically installs matching wasm-bindgen-cli from Cargo.lock
663+
- name: Install wasm-pack
664+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
665+
- name: Run wasm-bindgen tests (headless Firefox)
666+
run: wasm-pack test --headless --firefox
658667
working-directory: ./wasm-test
659668

660669
miri:

REUSE.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ path = "benchmarks-website/**"
1717
SPDX-FileCopyrightText = "Copyright the Vortex contributors"
1818
SPDX-License-Identifier = "CC-BY-4.0"
1919

20+
[[annotations]]
21+
path = "wasm-test/**"
22+
SPDX-FileCopyrightText = "Copyright the Vortex contributors"
23+
SPDX-License-Identifier = "CC-BY-4.0"
24+
2025
# Golden files are licensed under CC-BY-4.0.
2126
[[annotations]]
2227
path = "**/goldenfiles/**"

wasm-test/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# WASM build artifacts
2+
/target
3+
/pkg
4+
5+
# Cargo lock file for binary projects
6+
Cargo.lock

0 commit comments

Comments
 (0)