diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index de8da842..fa3d1fed 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -89,7 +89,15 @@ jobs: # No RUSTFLAGS override: `-C target-feature=-reference-types` broke wasm-bindgen's # externref table generation once the demo linked in real `Closure`-based code — see # `web/index.html`'s `data-target-name` comment. - run: trunk build --release --public-url /RustySNES/ + # + # `--features cheats,debug-hooks` (v1.20.0): both are pure computation with zero + # wasm-incompatible dependencies (confirmed via `cargo check --target + # wasm32-unknown-unknown`) — the demo previously only got the crate's own `default` + # feature set, which never included these, so their Tools/Debug menu items showed a + # "(rebuild with --features ...)" placeholder for no real architectural reason. Additive + # to (not replacing) `default` — Trunk only disables default features when + # `--no-default-features` is also passed, which this build does not do. + run: trunk build --release --public-url /RustySNES/ --features cheats,debug-hooks working-directory: crates/rustysnes-frontend/web - name: Enforce wasm size budget (< 5 MiB gzip) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c87d02..cc069acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- **Wasm demo: `Cheats`/`Debugger overlay` menu items now real, not placeholders** (Phase A of the + new UI/UX-parity ladder). `.github/workflows/web.yml`'s `trunk build` gained + `--features cheats,debug-hooks` — both are pure computation with zero wasm-incompatible + dependencies (confirmed via a real `cargo check --target wasm32-unknown-unknown` and a full + local `trunk build` reproducing the exact CI command), and had simply never been added to the + deployed demo's feature set, not excluded for any architectural reason. The hosted demo's + Tools → Cheats and Debug → Debugger overlay menu items now show their real controls instead of + a `(rebuild with --features ...)` label. Verified: the built demo's gzip size (2.96 MiB) stays + well under the 5 MiB budget gate (2.04 MiB headroom), and compile-time `#[cfg]` proof — + building with these features on means the sibling `#[cfg(not(feature = "..."))]` placeholder + branches are provably absent from this binary. `scripting`/`netplay`/`retroachievements` remain + genuinely unavailable on wasm (`mlua`/native sockets/`rcheevos` FFI are not wasm-portable) — + their placeholders are honest, not touched by this fix; see `docs/frontend.md`'s "hosted demo + page" section for the full disposition and `to-dos/ROADMAP.md`/the approved UI/UX-parity plan + for what fixing those three would actually require. + ## [1.19.0] "Afterburner" - 2026-07-15 Fifteenth release of the RustyNES-parity roadmap: an optional PGO/BOLT pipeline for the diff --git a/docs/frontend.md b/docs/frontend.md index 26aabb75..6d3db9ff 100644 --- a/docs/frontend.md +++ b/docs/frontend.md @@ -622,6 +622,15 @@ and `?settings=` share-link — none of those features exist in RustySNES today handling, no wasm Lua backend, no config-to-URL serialization), so faking their UI would be the same "claims support that doesn't exist" anti-pattern this project avoids everywhere else. +**`v1.20.0`:** `.github/workflows/web.yml`'s `trunk build` gained `--features cheats,debug-hooks` +— both are pure computation with zero wasm-incompatible dependencies (confirmed via a real +`cargo check --target wasm32-unknown-unknown`), and had simply never been added to the deployed +demo's build, not excluded for any architectural reason. Tools → Cheats and Debug → +Debugger overlay now show their real controls in the hosted demo instead of a +`(rebuild with --features ...)` placeholder label. `scripting`/`netplay`/`retroachievements` +remain genuinely unavailable on wasm today (`mlua`/native sockets/`rcheevos` FFI are not +wasm-portable) — their placeholders are honest, not a gap in this fix. + ## The `full` build (`v1.0.0`) `cargo full-build` / `cargo full-run ` (aliases in `.cargo/config.toml`) build/run the most