Skip to content

Commit

Permalink
Adding wasm build action
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Jan 12, 2025
1 parent c654164 commit c89f699
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ jobs:
- run: cargo install cross
- name: Build
run: cross build --target ${{ matrix.target }}
wasm:
name: Cargo wasm build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: jetli/[email protected]
- name: Build wasm
run: cargo build -r --lib --target wasm32-unknown-unknown
- name: Bind wasm
run: |
wasm-bindgen --target web --out-dir web/pkg \
target/wasm32-unknown-unknown/release/tex_fmt.wasm
- name: Optimize wasm
uses: NiklasEi/wasm-opt-action@v2
with:
options: -Oz
file: web/pkg/tex_fmt_bg.wasm
output: web/pkg/tex_fmt_bg.wasm
nix:
name: Nix build
runs-on: ubuntu-latest
Expand Down

0 comments on commit c89f699

Please sign in to comment.