Build the portable loader library on non-Windows hosts #599

Open
github-bot wants to merge 2 commits from github-bot/gh-599 into main AGit
Owner

@⁠shiaho777 on GitHub · 2026-12-04 13:10 UTC · original
shiaho777:fix/portable-loader-build → main · +2 −0 · 1 files · 2 commits · open

Building victory-loader on macOS fails in crash.rs because the module imports Windows-only dependencies. This prevents consumers from building the portable image-preparation and import-resolution APIs. Compile the crash handler under the same Windows condition as its exports. Compile the private image publisher for Windows and unit tests, where it has callers.

On Apple Silicon, the crate builds with all features, passes Clippy with warnings denied, and passes the six frame-rate and publication tests. Three preparation tests read the running executable as a PE image and therefore fail against the native Mach-O test binary. All three pass with a Windows test binary under Wine.

Also checked all features and tests for x86_64-pc-windows-msvc. The Windows GNU/LLVM library suite under Wine passed 60 of 61 tests. I reproduced the same failing write_sites::tests::changed_moves_and_vector_stores_do_what_they_did assertion on the unmodified base. cargo xtask policy passed.

**@⁠shiaho777** on GitHub · 2026-12-04 13:10 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/599) `shiaho777:fix/portable-loader-build` → `main` · +2 −0 · 1 files · 2 commits · open Building `victory-loader` on macOS fails in `crash.rs` because the module imports Windows-only dependencies. This prevents consumers from building the portable image-preparation and import-resolution APIs. Compile the crash handler under the same Windows condition as its exports. Compile the private image publisher for Windows and unit tests, where it has callers. On Apple Silicon, the crate builds with all features, passes Clippy with warnings denied, and passes the six frame-rate and publication tests. Three preparation tests read the running executable as a PE image and therefore fail against the native Mach-O test binary. All three pass with a Windows test binary under Wine. Also checked all features and tests for `x86_64-pc-windows-msvc`. The Windows GNU/LLVM library suite under Wine passed 60 of 61 tests. I reproduced the same failing `write_sites::tests::changed_moves_and_vector_stores_do_what_they_did` assertion on the unmodified base. `cargo xtask policy` passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 13:11:24 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-12-04 16:20 UTC · original

No change on native Windows, and the test that failed for you under Wine passes here.

Tested at 394ae3fa, directly on current main (5e44415b). Windows 11 Pro, Ryzen 7 5700X, x86_64-pc-windows-msvc, Rust 1.98.1.

  • cargo test --locked -p victory-loader --lib: 61 passed, 0 failed. With --all-features: 64 passed, 0 failed.
  • write_sites::tests::changed_moves_and_vector_stores_do_what_they_did: passed 40 of 40 runs alone, and in 40 of 40 runs of the whole library suite. So I could not reproduce that failure on native Windows with the MSVC build.
  • Both CI Clippy commands (default and --all-features) and cargo xtask policy: clean.
  • From reading: everything that uses crash (profile, stacks, the exports) is already Windows-only, and the only caller of publish outside its tests is windows.rs. Both modules are still compiled on Windows as before.

Not tested: the macOS or Linux build this PR is for (no such target here), the rest of the workspace's tests, starting a title.

AI use: Claude Code (Claude Opus 5.5) ran the tests, read the diff and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-12-04 16:20 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/599#issuecomment-7417270775) No change on native Windows, and the test that failed for you under Wine passes here. **Tested** at `394ae3fa`, directly on current `main` (`5e44415b`). Windows 11 Pro, Ryzen 7 5700X, `x86_64-pc-windows-msvc`, Rust 1.98.1. - `cargo test --locked -p victory-loader --lib`: 61 passed, 0 failed. With `--all-features`: 64 passed, 0 failed. - `write_sites::tests::changed_moves_and_vector_stores_do_what_they_did`: passed 40 of 40 runs alone, and in 40 of 40 runs of the whole library suite. So I could not reproduce that failure on native Windows with the MSVC build. - Both CI Clippy commands (default and `--all-features`) and `cargo xtask policy`: clean. - From reading: everything that uses `crash` (`profile`, `stacks`, the exports) is already Windows-only, and the only caller of `publish` outside its tests is `windows.rs`. Both modules are still compiled on Windows as before. **Not tested:** the macOS or Linux build this PR is for (no such target here), the rest of the workspace's tests, starting a title. **AI use:** Claude Code (Claude Opus 5.5) ran the tests, read the diff and wrote this report.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/599/head:github-bot/gh-599'
git switch 'github-bot/gh-599'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-599'
git switch 'github-bot/gh-599'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-599'
git switch 'github-bot/gh-599'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-599'
git switch 'main'
git merge --squash 'github-bot/gh-599'
git switch 'main'
git merge --ff-only 'github-bot/gh-599'
git switch 'main'
git merge 'github-bot/gh-599'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.