Skip to content

Commit da9fa4c

Browse files
authored
feat: wasm support for browser (#204)
1 parent 067c9a1 commit da9fa4c

File tree

105 files changed

+9066
-2765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+9066
-2765
lines changed

.github/workflows/ci.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
CARGO_TERM_COLOR: always
99
RUSTFLAGS: -D warnings
1010
RUST_BACKTRACE: full
11-
RUST_TOOLCHAIN: 1.75.0
11+
RUST_TOOLCHAIN: 1.81.0
1212
jobs:
1313
rustfmt:
1414
name: Checks / Format
@@ -32,8 +32,30 @@ jobs:
3232
run: |
3333
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component clippy
3434
rustup override set ${{ env.RUST_TOOLCHAIN }}
35+
# For wasm targets
36+
rustup target add wasm32-unknown-unknown
3537
- name: Lint Check
3638
run: make clippy
39+
test-wasm:
40+
name: Tests / Build & Test (Wasm)
41+
needs: [ rustfmt, clippy ]
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout the Repository
45+
uses: actions/checkout@v4
46+
- name: Setup nodejs
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: 20
50+
- name: Install dependencies
51+
run: |
52+
cargo install wasm-pack
53+
- name: Build
54+
run: |
55+
make build-wasm
56+
- name: Run unit-tests with wasm-pack
57+
run: |
58+
make test-wasm
3759
test:
3860
name: Tests / Build & Test
3961
needs: [ rustfmt, clippy ]

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
/target/
2+
**/node_modules/**
3+
**/pkg/**
4+
/test
5+
/node_modules
6+
/yarn.lock
7+
/package-lock.json
8+
/.vscode
9+
/data

0 commit comments

Comments
 (0)