Skip to content

Commit

Permalink
Add CI checks for WASM bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jan 18, 2024
1 parent be88889 commit 2355399
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
pull_request:
push:
branches:
- main

name: WASM

env:
RUSTDOCFLAGS: "-D warnings"
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"

jobs:
# Default
test-features-default:
name: "Build & Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build
- run: cargo test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- run: cargo +nightly clippy -- -D warnings

doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: doc
- run: cargo doc
4 changes: 4 additions & 0 deletions bindings/wasm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#![deny(unsafe_code)]
#![forbid(unsafe_code)]
#![warn(missing_docs)]
#![warn(clippy::missing_docs_in_private_items)]
#![allow(non_snake_case)] // JS uses camelCase by default
#![allow(clippy::new_without_default)] // Default is useless for WASM

Expand Down

0 comments on commit 2355399

Please sign in to comment.