diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d94d8a4..7b04f35f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -209,7 +209,7 @@ jobs: env: LIGHTCRAFT_VERSION: ${{ needs.version.outputs.version }} LIGHTCRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} - TRUNK_VERSION: 0.21.14 + WASM_BINDGEN_VERSION: 0.2.129 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -218,11 +218,12 @@ jobs: - uses: Swatinem/rust-cache@v2 with: key: release-web - - name: Install trunk + - name: Install wasm-bindgen CLI run: | - curl -fsSL "https://github.com/trunk-rs/trunk/releases/download/v${TRUNK_VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz" \ - | tar -xz -C "$HOME/.cargo/bin" trunk - trunk --version + # Must match the wasm-bindgen version in Cargo.lock exactly (cargo xtask web checks it). + command -v wasm-bindgen >/dev/null && wasm-bindgen --version | grep -q "$WASM_BINDGEN_VERSION" \ + || cargo install wasm-bindgen-cli --version "$WASM_BINDGEN_VERSION" --locked + wasm-bindgen --version - name: Apply version override if: inputs.version != '' run: cargo xtask version set "$LIGHTCRAFT_VERSION" diff --git a/packaging/web/package.sh b/packaging/web/package.sh index 52055b9c..8e8f0cf0 100755 --- a/packaging/web/package.sh +++ b/packaging/web/package.sh @@ -3,8 +3,8 @@ # # Usage: packaging/web/package.sh [--skip-build] # -# Needs: trunk (brew install trunk / cargo install trunk --locked) and the wasm32-unknown-unknown -# target. The zip holds a self-contained static site in lightcraft-web-/ that works +# Needs: the wasm32-unknown-unknown target and the wasm-bindgen CLI at the version in Cargo.lock +# (see docs/web.md); `cargo xtask web` builds it. The zip holds a self-contained static site in lightcraft-web-/ that works # from any URL path and inside an