Skip to content

Update chd libraries#50

Merged
techomancer merged 5 commits into
techomancer:mainfrom
danifunker:update-chd-libraries
Jul 2, 2026
Merged

Update chd libraries#50
techomancer merged 5 commits into
techomancer:mainfrom
danifunker:update-chd-libraries

Conversation

@danifunker

Copy link
Copy Markdown
Contributor
  • Updated CHD Library to 0.288.8 , removes GPL licensing for libchdman-rs (this was incorrectly licensed for GPL3, it is now MIT)
  • Adds support for Windows ARM builds
  • Adds support for RISC-V Linux builds
  • Resolved an issue on Windows Builds for ultra64 support

@danifunker danifunker marked this pull request as ready for review June 30, 2026 20:13
danifunker and others added 5 commits July 1, 2026 22:43
libchdman-rs 0.288.8 and the MAME CHD core it vendors are now BSD-3-Clause,
so --features chd no longer subjects the binary to the GPL. Replace the GPL-3.0
license file and in-app notice with a BSD-3-Clause third-party notice and update
the docs/installer references accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a TargetArch define (x64/arm64) that maps to Inno's ArchitecturesAllowed /
ArchitecturesInstallIn64BitMode so the installer locks to the architecture of the
bundled iris-gui.exe. CI passes /DTargetArch=<arch>. This is functional/shared
installer code (it lives upstream), so it belongs on this branch rather than the
fork's main-only pipeline overlay.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ultra64 module's only libc use is the POSIX `shm_unlink` stale-shm cleanup,
which is already `#[cfg(unix)]`. The module-level `use libc;` was not gated,
so a Windows build (iris-gui enables the ultra64 feature on all platforms)
failed with E0432 "unresolved import `libc`" — libc is a `cfg(not(windows))`
dependency. Gate the import too; Windows shared memory is OS-refcounted and
needs no shm_unlink.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The `#[cfg(unix)]` branch passed `server` by move into
`start_unix_server`, then reused it at `Ok(server)`. Compiles on Windows
(that branch is cfg'd out) but not on macOS/Linux. Clone the Arc to match
the adjacent TCP branch, which already does `server.clone()`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@danifunker danifunker force-pushed the update-chd-libraries branch from b3fc6aa to 85ff16d Compare July 2, 2026 02:48
@techomancer techomancer merged commit 6fa11b2 into techomancer:main Jul 2, 2026
1 check failed
@danifunker

Copy link
Copy Markdown
Contributor Author

Heads up: main is currently failing CI (Rust build).

The break is a borrow-check error in src/ci.rs, not anything new:

error[E0382]: the type `Arc` does not implement `Copy`
   --> src/ci.rs:140:8

In start_server(), the #[cfg(unix)] path calls start_unix_server(server, &path) — which moves the Arc — and then the function returns Ok(server), using it after the move. It compiles on Windows only because that branch is #[cfg(unix)]-gated out; on Linux and macOS it's a hard error, which is why the GitHub Actions Rust job fails.

The one-line fix is to clone the Arc (matching the TCP branch right above it, which already does server.clone()):

#[cfg(unix)]
start_unix_server(server.clone(), &path)?;

This is already fixed on the update-chd-libraries branch (commit 85ff16d), but main (e5f27f5, "Fork overlay…") never picked it up, so it regressed. Merging update-chd-libraries into main resolves it — the only merge conflict is Cargo.toml (libchdman-rs 0.288.9 vs 0.288.8; keep 0.288.9).

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