Skip to content

v1.3.0 beta.1 — Workstream A (Rust 2024 edition) + C1-RES re-baseline doc - #79

Merged
doublegate merged 1 commit into
mainfrom
feat/v1.3.0-beta.1-toolchain
Jun 16, 2026
Merged

v1.3.0 beta.1 — Workstream A (Rust 2024 edition) + C1-RES re-baseline doc#79
doublegate merged 1 commit into
mainfrom
feat/v1.3.0-beta.1-toolchain

Conversation

@doublegate

Copy link
Copy Markdown
Owner

v1.3.0 "Bedrock" — beta.1 (Workstream A part 1: Rust 2024 edition + C1-RES re-baseline)

First increment of the v1.3.0 "Bedrock" release train. Additive, determinism-neutral, fully verified.

Rust edition 2021 → 2024 (Workstream A, part 1)

The whole workspace now compiles on the 2024 edition. Mechanical migration via cargo fix --edition (run across the default, test-roms, and frontend scripting/hd-pack feature sets) + cargo fmt --all (2024 style):

  • extern "C" { … } FFI blocks → unsafe extern "C" { … } (rustynes-cheevos).
  • disasm opcode-table macro fragment specifiers pinned to expr_2021 (preserves 2021 macro-matching).
  • one gen local → raw identifier r#gen (reserved keyword in 2024).
  • removed a redundant block-return brace (unused_braces).
  • imports reformatted to the 2024 rustfmt style (the bulk of the diff; cosmetic).

No tail_expr_drop_order restructuring was needed → no drop-order / determinism surface. MSRV stays 1.86 for now (edition 2024 stabilized in 1.85); the egui 0.34 / wgpu 26 / rfd 0.17 dependency-tier bump that needs a newer MSRV is the next part of Workstream A (separate PR).

C1-RES — hard-tier accuracy re-baseline (doc-only)

Per the maintainer's directive, the hard-tier probes were re-run against the current master-clock core. docs/STATUS.md now records (dated 2026-06-15): cpu_interrupts_v2 is 5/5 strict (closed); exactly three residuals remain (mmc3_test_2/4 #3 + two apu_reset), sharing one fractional-master-clock root cause and deferred as a future v2.0-scale item (maintainer decision: keep deferring; zero production-ROM impact).

Verification (all green locally)

  • Determinism: AccuracyCoin 100% (139/139), visual_regression golden framebuffers byte-identical, nestest 0-diff, cpu_interrupts_v2 5/5 strict — all unchanged.
  • cargo check --workspace (default + test-roms); clippy --workspace --all-targets -D warnings; clippy -p rustynes-frontend --features scripting,hd-pack -D warnings; cargo fmt --all --check; no_std cross-compile (thumbv7em-none-eabihf); markdownlint (v0.39.0).

🤖 Generated with Claude Code

…ream A) + C1-RES re-baseline doc

v1.3.0 "Bedrock" beta.1, part 1 of Workstream A (toolchain modernization). Moves
the entire workspace to the Rust 2024 edition and records the hard-tier accuracy
re-baseline. Determinism-neutral and fully verified.

Edition 2021 -> 2024
- [workspace.package] edition + the two explicit-edition crates (rustynes-cheevos,
  rustynes-script) bumped to "2024".
- Mechanical migration via `cargo fix --edition` across the default, test-roms, and
  frontend scripting/hd-pack feature sets, then `cargo fmt --all` (2024 style):
  * `extern "C" { ... }` FFI declaration blocks -> `unsafe extern "C" { ... }`
    (rustynes-cheevos/src/ffi.rs) — 2024 requires the `unsafe` on extern blocks.
  * disasm opcode-table macro fragment specifiers pinned to `expr_2021`
    (rustynes-cpu/src/disasm.rs) — preserves exact 2021 macro-matching semantics.
  * one `gen` local -> raw identifier `r#gen` (rustynes-frontend/src/audio.rs);
    `gen` is a reserved keyword in 2024.
  * removed a redundant block-return brace flagged by `unused_braces`
    (rustynes-core/src/bus.rs::oam_dma_overlap_ready).
  * imports reformatted to the 2024 rustfmt style (uppercase-first grouping) across
    the workspace — the bulk of the diff; purely cosmetic.
- No `tail_expr_drop_order` restructuring was required, so there is no drop-order /
  determinism surface. MSRV stays 1.86 (edition 2024 stabilized in 1.85); the
  egui 0.34 / wgpu 26 / rfd 0.17 dependency-tier bump that needs a newer MSRV is a
  separate follow-up step in this workstream.

Determinism + quality gates (all green)
- AccuracyCoin 100% (139/139), `visual_regression` golden framebuffers byte-identical,
  `nestest` 0-diff, `cpu_interrupts_v2` 5/5 strict — all unchanged.
- cargo check --workspace (default + test-roms); clippy --workspace --all-targets
  -D warnings; clippy -p rustynes-frontend --features scripting,hd-pack -D warnings;
  cargo fmt --all --check; no_std cross-compile (rustynes-core, thumbv7em-none-eabihf);
  markdownlint (v0.39.0).

C1-RES — hard-tier accuracy re-baseline doc (v1.3.0 beta.1, doc-only)
- docs/STATUS.md: added a dated (2026-06-15) re-baseline note to the authoritative
  "Accuracy residuals" section. Confirms `cpu_interrupts_v2` is 5/5 strict (closed),
  and that exactly three residuals remain (`mmc3_test_2/4` #3 + two `apu_reset`),
  which two independent root-cause diagnoses found share one cause — the integer
  3-PPU-dots-per-CPU-cycle scheduler cannot represent the M2 sub-cycle phase, and
  Nes::reset() is a function-call reset. Closing all three is a single v2.0-scale
  fractional-master-clock + cycle-accurate-reset refactor (HIGH risk, 15+ rollbacks,
  ADR-0002 stop condition); maintainer decision is to keep deferring.

CHANGELOG.md: [Unreleased] gains a "Changed" entry for the edition migration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 16, 2026 02:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modernizes the workspace by migrating from the Rust 2021 edition to the Rust 2024 edition. The changes are mechanical and determinism-neutral, including updating extern "C" blocks to unsafe extern "C", renaming the gen identifier to the raw identifier r#gen (as gen is now a reserved keyword), and pinning macro fragment specifiers to expr_2021 to preserve macro-matching. Additionally, imports have been reformatted to the Rust 2024 style, minor code cleanups have been applied, and project documentation has been updated to reflect this modernization. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@doublegate
doublegate merged commit fb591a8 into main Jun 16, 2026
13 checks passed
@doublegate
doublegate deleted the feat/v1.3.0-beta.1-toolchain branch June 16, 2026 03:03
doublegate added a commit that referenced this pull request Jun 16, 2026
…ns latest (#80)

* build(deps): MSRV 1.86->1.96 + egui 0.34 / wgpu 29 / rfd 0.17 tier (v1.3.0 Workstream A)

v1.3.0 "Bedrock" beta.1, part 2 of Workstream A (toolchain modernization) — the
dependency-tier bump that the edition-2024 cut (#79) deferred. Presentation-only;
the chip stack and the determinism contract are untouched.

Toolchain / MSRV
- rust-toolchain.toml channel + [workspace.package] rust-version + the two
  explicit-version crates (cheevos, script) + the CI MSRV jobs (ci/security/pgo)
  all -> Rust 1.96 (latest stable). .cargo/config MSRV comment updated.

Dependency tier (coordinated, MSRV-gated)
- egui / egui-wgpu / egui-winit 0.32 -> 0.34.3; wgpu 25 -> 29.0.3 (egui 0.34
  requires wgpu 29 — the ecosystem moved past the plan's "wgpu 26" assumption);
  naga 25; rfd 0.14 -> 0.17.2. wasm-bindgen unchanged at 0.2.125 (Trunk.toml pin
  still matches Cargo.lock).

wgpu 29 frontend migration (gfx/crt/ntsc/ntsc_bisqwit/shader_pass/debugger)
- get_current_texture() now returns the CurrentSurfaceTexture enum (not a Result):
  added gfx::PresentError { Reconfigure, Other } and matched the enum so the
  reconfigure-on-Lost/Outdated behavior is preserved exactly.
- RenderPassColorAttachment gains depth_slice: None; RenderPassDescriptor and
  RenderPipelineDescriptor use multiview_mask; PipelineLayoutDescriptor uses
  immediate_size + Option-wrapped bind_group_layouts; samplers use
  MipmapFilterMode; InstanceDescriptor/DeviceDescriptor use the new constructors
  (new_without_display_handle_from_env / experimental_features).

egui 0.34 migration (debugger/mod.rs, ui_shell.rs, app.rs)
- Context::run -> run_ui (threads a root &mut Ui); Panel::top/bottom(..)
  .show_inside(ui, ..); content_rect()/global_style()/egui_wants_*_input();
  egui_wgpu::Renderer::new(.., RendererOptions { .. }). rfd 0.17 needed no changes.

1.96 clippy cleanup (workspace) + manual fixes
- cargo clippy --fix across the workspace for the newer 1.96 lints (collapsible
  let-chains, map_unwrap_or, manual_is_multiple_of, elidable_lifetime_names, ...);
  45 chip-stack files affected — all behavior-preserving style rewrites, verified
  determinism-neutral. Manual: app.rs guard-then-expect #[allow(unnecessary_unwrap)]
  with justification (borrows must defer into the render arms); netplay webrtc.rs
  peer_count -> const fn; cheats.rs CheatFile cfg-gated to native (wasm dead_code).

CI: GitHub Actions versions bumped to latest
- actions/upload-artifact v4 -> v7. All other actions (checkout@v6,
  configure-pages@v6, deploy-pages@v5, upload-pages-artifact@v5,
  action-gh-release@v3, taiki-e/install-action@v2, Swatinem/rust-cache@v2,
  dtolnay/rust-toolchain@master) and the *-latest runners already track newest.

Verification (all green on 1.96)
- Determinism: AccuracyCoin 100% (139/139), visual_regression golden framebuffers
  byte-identical, nestest unchanged.
- clippy -D warnings: native workspace + frontend scripting,hd-pack + both wasm
  flavours (winit/canvas). fmt --all --check. RUSTDOCFLAGS=-D warnings cargo doc
  --workspace --no-deps. no_std cross-compile (rustynes-core, thumbv7em-none-eabihf).
- wasm: trunk build --release succeeds; size budget PASS 3.06 / 5.00 MiB gzip.

Docs: CHANGELOG [Unreleased] gains MSRV+dep-tier and GH-Actions entries; CLAUDE.md
toolchain/edition markers updated to edition 2024 / Rust 1.96.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): restore sync_sinks lifetime + RA-feature 1.96 clippy

The workspace `cargo clippy --fix` pass ran on default features and tripped two
feature-interaction issues only visible with `--features retroachievements`:

- `clippy::elidable_lifetime_names` (the 1.96 rename of `needless_lifetimes`)
  stripped the `<'a>` from `App::sync_sinks`, but `'a` is genuinely used by the
  cfg-gated `ra: &'a mut Option<RaSession>` param under the feature -> the RA
  build failed (E0261 then E0106). Restored `<'a>`, tied `audio` + `ra` + the
  `FrameSinks<'a>` return all to `'a`, and broadened the existing non-feature
  `allow` to cover BOTH lint names (the default path has a single ref param, so
  the lifetime is technically elidable there).
- 5 `collapsible_if` lints in RA-only code (app.rs RA branches, badge_cache.rs,
  ra_session.rs) the default-feature autofix never compiled -> collapsed.

Verified clippy -D warnings clean across the FULL native feature matrix (default,
scripting+hd-pack, retroachievements, scripting+hd-pack+retroachievements) + both
wasm flavours; RA build + fmt clean. (Lesson: run the retroachievements per-feature
clippy gate too, not just scripting/hd-pack/wasm.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): run .zip extraction + soft-patching on the CLI/initial-ROM path

Pre-existing v1.2.0 bug: App::new (the path for a ROM passed on argv, via
app::run) read the file and stored the raw bytes, skipping the .zip extraction +
same-stem .bps/.ups/.ips soft-patching that load_rom_from_path (menu / drag-drop /
recent-ROM) performs. So `rustynes foo.zip` fed raw archive bytes to
Nes::from_rom and failed: "rom magic bytes do not match NES\x1A".

Fix: factor the ingest preprocessing into a free `load_and_preprocess_rom(path)`
helper (reads the file; if `.zip`, extracts the first NES/FDS/NSF entry and uses
its name as the label; then applies a same-stem soft-patch, bps>ups>ips). App::new
now calls it, so a zipped/patched ROM on argv reaches the deterministic parse AND
the CRC-keyed per-game DB (apply_game_db) as the extracted/patched image -
identical to every other load path. Extracting the helper also drops App::new back
under the clippy too_many_lines threshold. Native-only (wasm AppEvent::RomLoaded
preprocesses separately).

Adds a regression test (cli_path_extracts_zip_to_nes_image) that writes a real
.zip and asserts the helper returns the bare NES image + inner-entry label.

Verified: 3/3 zip tests pass; clippy -D warnings clean (default + retroachievements);
the reported mapper-009-MMC2 .zip holds a valid NES\x1A entry the helper resolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(changelog): note the .zip-on-CLI ingest fix under [Unreleased]

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
doublegate added a commit that referenced this pull request Jun 16, 2026
Cut the v1.3.0 "Bedrock" foundation + breadth release on the cycle-accurate
v1.0.0 core. Bumps workspace + crate versions 1.2.0 -> 1.3.0, finalizes
CHANGELOG [Unreleased] -> [1.3.0], and updates README / STATUS / CLAUDE.

Shipped (all merged, additive/off-by-default, AccuracyCoin 100% 139/139 held):
edition 2024 / Rust 1.96 / egui 0.34.3 + wgpu 29.0.3 + rfd 0.17.2 toolchain
(#79/#80); frame-pacing fix (#82); Memory Compare + menu/Settings reorg +
per-setting auto-save (#84); mapper coverage 87 -> 101 BestEffort sweep (#85) +
Vs. DualSystem header detection (#86) + the m218 16K-PRG fix + BestEffort
boot-smoke screenshots (#87); HD-pack <condition>/<background> rules (#88, ADR
0014); netplay desync diagnostics + niche peripheral aliases (#89). PGO/BOLT gate
exercised. C1 hard-tier residuals re-baselined (cpu_interrupts_v2 closed; 3
deferred to v2.0).

Carryover (maintainer-manual): casual-mode browser RetroAchievements (ADR 0015 —
needs Emscripten/pure-Rust rcheevos->wasm + live-browser verify; native RA
unaffected); plus the v1.2.0-era F1 on-device touch + F3 live-netplay matrix.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants