Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Check formatting
run: |
for manifest in Cargo.toml asset-io-c/Cargo.toml fuzz/Cargo.toml; do
for manifest in Cargo.toml asset-io-c/Cargo.toml asset-io-wasm/Cargo.toml fuzz/Cargo.toml; do
cargo fmt --manifest-path "$manifest" -- --check
done

Expand Down Expand Up @@ -102,3 +102,30 @@ jobs:
c++ -x c++ -std=c++17 -Wall -Wextra -Werror -Iasset-io-c/include asset-io-c/examples/smoke.c \
-Lasset-io-c/target/debug -lasset_io_c -Wl,-rpath,"$PWD/asset-io-c/target/debug" -o asset-io-c/target/cpp-smoke
asset-io-c/target/cpp-smoke

wasm-bindings:
name: Wasm / JavaScript async proof
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: wasm32-unknown-unknown
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Native wrapper checks
run: |
cargo test --locked --manifest-path asset-io-wasm/Cargo.toml --no-default-features
cargo test --locked --manifest-path asset-io-wasm/Cargo.toml --all-features
cargo clippy --locked --manifest-path asset-io-wasm/Cargo.toml --all-features --all-targets -- -D warnings
- name: Install Wasm packaging tool
run: cargo install wasm-pack --version 0.14.0 --locked
- name: Build Wasm and native comparison oracle
run: |
wasm-pack build asset-io-wasm --target nodejs --dev --no-opt -- --locked --target-dir "$PWD/asset-io-wasm/target"
wasm-pack build asset-io-wasm --target web --out-dir pkg-web --dev --no-opt -- --locked --target-dir "$PWD/asset-io-wasm/target"
cargo build --locked --manifest-path asset-io-wasm/Cargo.toml --example inspect --target-dir asset-io-wasm/target
- name: Test JavaScript-owned async reads
run: node --test asset-io-wasm/js/async.test.mjs
Loading
Loading