Skip to content

Commit

Permalink
feat: wasm support for browser (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Officeyutong authored Jan 21, 2025
1 parent 067c9a1 commit da9fa4c
Show file tree
Hide file tree
Showing 105 changed files with 9,066 additions and 2,765 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
RUST_TOOLCHAIN: 1.75.0
RUST_TOOLCHAIN: 1.81.0
jobs:
rustfmt:
name: Checks / Format
Expand All @@ -32,8 +32,30 @@ jobs:
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component clippy
rustup override set ${{ env.RUST_TOOLCHAIN }}
# For wasm targets
rustup target add wasm32-unknown-unknown
- name: Lint Check
run: make clippy
test-wasm:
name: Tests / Build & Test (Wasm)
needs: [ rustfmt, clippy ]
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
cargo install wasm-pack
- name: Build
run: |
make build-wasm
- name: Run unit-tests with wasm-pack
run: |
make test-wasm
test:
name: Tests / Build & Test
needs: [ rustfmt, clippy ]
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/target/
**/node_modules/**
**/pkg/**
/test
/node_modules
/yarn.lock
/package-lock.json
/.vscode
/data
Loading

0 comments on commit da9fa4c

Please sign in to comment.