feat: initial wasm support
This commit is contained in:
parent
2ebd47dbea
commit
00b46a278a
19 changed files with 1252 additions and 17 deletions
10
.github/workflows/rust.yml
vendored
10
.github/workflows/rust.yml
vendored
|
|
@ -1,17 +1,13 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
|
@ -20,7 +16,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
|
|
|||
34
.github/workflows/wasm.yml
vendored
Normal file
34
.github/workflows/wasm.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Wasm
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: wasm
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "14"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
yarn
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
wasm-pack build --target web --out-dir wasm/pkg -- --features wasm
|
||||
yarn build
|
||||
|
||||
- name: Deploy to gh pages
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.5
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: wasm/lib
|
||||
Loading…
Add table
Add a link
Reference in a new issue