From 74f9f5008675ee607150b8ccf44a7e79202644c4 Mon Sep 17 00:00:00 2001 From: osobh Date: Sat, 26 Sep 2026 00:00:11 -0500 Subject: [PATCH] ci: build the clawhdf5 read path for wasm32-unknown-unknown The facade already builds for the browser target without mmap (and with it: memmap2 compiles there and File::open just fails, as std::fs does). Nothing needed gating; keep it that way with a ci-test.sh step, and install the target in the CI container. Co-Authored-By: Claude Opus 5.5 (1M context) --- .gitea/workflows/ci.yml | 3 +++ scripts/ci-test.sh | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1a7cdde..853a729 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -22,6 +22,9 @@ jobs: run: rustup component add rustfmt clippy - name: Install thumbv7em-none-eabihf target run: rustup target add thumbv7em-none-eabihf + - name: Install wasm32-unknown-unknown target + # ci-test.sh builds the reader and clawhdf5-wasm for the browser. + run: rustup target add wasm32-unknown-unknown - name: Install Python interop dependencies # The interop suites used to skip silently when python3/h5py were # missing, so they never ran in CI. Install them and make a missing diff --git a/scripts/ci-test.sh b/scripts/ci-test.sh index 1d7a7f9..6cad171 100755 --- a/scripts/ci-test.sh +++ b/scripts/ci-test.sh @@ -106,6 +106,14 @@ no_c_in_default_build() { } run_step "no C in the default build (core crates)" no_c_in_default_build +# The reader in the browser: the facade's read path must build for +# wasm32-unknown-unknown (no mmap, no threads, no file system). Needs +# `rustup target add wasm32-unknown-unknown`. +run_step "wasm32 build (clawhdf5, no default features)" cargo build \ + -p clawhdf5 \ + --target wasm32-unknown-unknown \ + --no-default-features + # The workspace declares a minimum Rust version (rust-version in Cargo.toml); # check that it really builds there, so the README badge and the manifests # cannot drift from the truth. Separate target dir: a different toolchain