Skip to content

Commit 7debedd

Browse files
authored
Merge pull request #195 from RCasatta/2024-01--wasm
Fix WASM build and add a job in CI
2 parents 73403be + 7c6933d commit 7debedd

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/rust.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,15 @@ jobs:
110110
DO_FEATURE_MATRIX: false
111111
run: ./contrib/test.sh
112112

113+
Wasm:
114+
name: Check WASM
115+
runs-on: ubuntu-latest
116+
strategy:
117+
fail-fast: false
118+
steps:
119+
- name: Checkout Crate
120+
uses: actions/checkout@v3
121+
- name: Checkout Toolchain
122+
uses: dtolnay/rust-toolchain@stable
123+
- run: rustup target add wasm32-unknown-unknown
124+
- run: cargo check --target wasm32-unknown-unknown

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ actual-serde = { package = "serde", version = "1.0.103", features = [
3434
], optional = true }
3535

3636

37+
[target.wasm32-unknown-unknown.dev-dependencies]
38+
getrandom = { version = "0.2", features = ["js"] }
39+
3740
[dev-dependencies]
3841
rand = "0.8"
3942
rand_chacha = "0.3"

0 commit comments

Comments
 (0)