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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,33 @@ jobs:
- name: cargo check
run: cargo check --workspace --all-features --lib --bins

wasm_build:
name: Build wasm32
runs-on: ubuntu-latest
env:
RUSTFLAGS: '--cfg getrandom_backend="wasm_js"'
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Add wasm target
run: rustup target add wasm32-unknown-unknown

- name: Install wasm-tools
uses: bytecodealliance/actions/wasm-tools/setup@v1

- name: wasm32 build
run: cargo build --target wasm32-unknown-unknown

# If the Wasm file contains any 'import "env"' declarations, then
# some non-Wasm-compatible code made it into the final code.
- name: Ensure no 'import "env"' in wasm
run: |
! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/bao_tree.wasm | grep 'import "env"'

# minimal-crates:
# runs-on: ubuntu-latest
# steps:
Expand Down
Loading
Loading