From 6a4abcec0d6a1305ead6989f26a335138f12147a Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 29 Dec 2025 15:00:43 -0600 Subject: [PATCH] build(emsdk): update to latest version and fix unused import warning Updates CI/CD emsdk from pinned 3.1.43 to latest (4.0.22), resolving a version mismatch between local dev (which used latest) and production builds. This discrepancy likely caused production-only ErrnoError bugs that were impossible to reproduce locally. --- .github/workflows/deploy.yaml | 2 +- README.md | 3 +-- pacman/src/main.rs | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 07da3dd..8de85dc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -27,7 +27,7 @@ jobs: - name: Setup Emscripten SDK uses: pyodide/setup-emsdk@v15 with: - version: 3.1.43 + version: latest actions-cache-folder: "emsdk-cache-b" - name: Setup Rust (WASM32 Emscripten) diff --git a/README.md b/README.md index 2423b55..773173c 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,7 @@ Since this project is still in progress, I'm only going to cover non-obvious bui - We use rustc 1.86.0 for the build, due to bulk-memory-opt related issues on wasm32-unknown-emscripten. - Technically, we could probably use stable or even nightly on desktop targets, but using different versions for different targets is a pain, mainly because of clippy warnings changing between versions. - For the WASM build, you need to have the Emscripten SDK cloned; you can do so with `git clone https://github.com/emscripten-core/emsdk.git` - - The first time you clone, you'll need to install the appropriate SDK version with `./emsdk install 3.1.43` and then activate it with `./emsdk activate 3.1.43`. On Windows, use `./emsdk/emsdk.ps1` instead. - - I'm still not sure _why_ 3.1.43 is required, but it is. Perhaps in the future I will attempt to use a more modern version. + - The first time you clone, you'll need to install the SDK with `./emsdk install latest` and then activate it with `./emsdk activate latest`. On Windows, use `./emsdk/emsdk.ps1` instead. - Occasionally, the build will fail due to dependencies failing to download. I even have a retry mechanism in the build workflow due to this. - You can then activate the Emscripten SDK with `source ./emsdk/emsdk_env.sh` or `./emsdk/emsdk_env.ps1` or `./emsdk/emsdk_env.bat` depending on your OS/terminal. - While using the `web.build.ts` is not technically required, it simplifies the build process and is very helpful. diff --git a/pacman/src/main.rs b/pacman/src/main.rs index 50c88cd..55574f4 100644 --- a/pacman/src/main.rs +++ b/pacman/src/main.rs @@ -3,6 +3,7 @@ #![cfg_attr(coverage_nightly, feature(coverage_attribute))] #![cfg_attr(coverage_nightly, coverage(off))] +#[cfg(not(target_os = "emscripten"))] use std::env; use crate::{app::App, constants::LOOP_TIME};