feat: native launcher ported to Rust (anyxboxx-native-launcher) #249

Manually merged
github merged 27 commits from gh-pr/249/head into gh-pr/249/base 2026-11-26 05:40:23 +00:00
Owner

@⁠LooperSalty on GitHub · 2026-11-25 21:23 UTC · original
LooperSalty:codex/native-launcher → rust/full · +2410 −11 · 27 files · 27 commits · merged 2026-11-25 22:37 UTC

Change

Port of runtime/launcher/launcher.cpp (the native mode launcher) to Rust, as part of the rust/full migration (docs/rust-full-status.md, decision D4). Written by OpenAI Codex at the maintainer's request, in small commits on top of rust/full 754d1e0f.

  • Package manifest parsing, PE section mapping and relocations, image allocation, import table decoding and binding (missing symbols reported), Win32 loader hooks and local DLL import hooks, TLS installation and callbacks, exception registration and first-exception report, entry point call, command line identical to the C++ launcher.
  • CMake integration next to the other Rust runtime pieces; the C++ launcher stays in the tree as the parity oracle for now.
  • Parity tests against the C++ launcher (tests/test_native_*).

Verification (local, Windows)

  • cargo build --release --workspace, cargo test --release --workspace, cargo clippy (crate, -D warnings), cargo fmt --check: pass.
  • Runtime built with CMake/Ninja; native pytest: 39 passed, 6 skipped (cases needing the TomBox DLLs).
  • No game or game file was run or used.

Follow-ups

  • Check the 6 skipped cases once the TomBox DLLs are built.
  • Remove the C++ launcher after a release cycle with the Rust one as default.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz

**@⁠LooperSalty** on GitHub · 2026-11-25 21:23 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/249) `LooperSalty:codex/native-launcher` → `rust/full` · +2410 −11 · 27 files · 27 commits · merged 2026-11-25 22:37 UTC ## Change Port of `runtime/launcher/launcher.cpp` (the native mode launcher) to Rust, as part of the `rust/full` migration (docs/rust-full-status.md, decision D4). Written by OpenAI Codex at the maintainer's request, in small commits on top of `rust/full` 754d1e0f. - Package manifest parsing, PE section mapping and relocations, image allocation, import table decoding and binding (missing symbols reported), Win32 loader hooks and local DLL import hooks, TLS installation and callbacks, exception registration and first-exception report, entry point call, command line identical to the C++ launcher. - CMake integration next to the other Rust runtime pieces; the C++ launcher stays in the tree as the parity oracle for now. - Parity tests against the C++ launcher (`tests/test_native_*`). ## Verification (local, Windows) - `cargo build --release --workspace`, `cargo test --release --workspace`, `cargo clippy` (crate, `-D warnings`), `cargo fmt --check`: pass. - Runtime built with CMake/Ninja; native pytest: 39 passed, 6 skipped (cases needing the TomBox DLLs). - No game or game file was run or used. ## Follow-ups - Check the 6 skipped cases once the TomBox DLLs are built. - Remove the C++ launcher after a release cycle with the Rust one as default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:40:20 +00:00
github manually merged commit e134eaa744 into gh-pr/249/base 2026-11-26 05:40:23 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 21:23 UTC · original · edited 2026-11-25 21:25 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T21:25:00.329157Z 7a1bb9e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 21:23 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/249#issuecomment-7175008622) · edited 2026-11-25 21:25 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"7a1bb9efcc66fb66dc1a56a8b49a6f112e66c1b5","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-25T21:25:00.329157Z">2026-11-25T21:25:00.329157Z</relative-time> | `7a1bb9e` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
@ -0,0 +80,4 @@
return Err(ImageError::InvalidPe);
}
let nt = u32_at(file, 60).ok_or(ImageError::InvalidPe)? as usize;
range(nt, NT_HEADERS_SIZE, file.len()).ok_or(ImageError::InvalidPe)?;
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 21:24 UTC · original

P1 Badge Reuse the existing VIctory PE parser

This introduces another handwritten PE parser, with a separate import-table decoder in imports.rs, although victory_pe::ImageInfo::parse already provides PE headers, sections and imports and is reused by crates/anyxboxx-pe. Maintaining independent decoding paths means format fixes and validation changes must now be duplicated across launchers. AGENTS.md explicitly requires new Rust code to reuse VIctory's and TomBox's crates instead of reimplementing them. Build the native-specific mapping and binding logic on the existing parser rather than introducing a separate implementation.

AGENTS.md reference: AGENTS.md:L44-L44

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 21:24 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/249#discussion_r4701047042) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Reuse the existing VIctory PE parser** This introduces another handwritten PE parser, with a separate import-table decoder in `imports.rs`, although `victory_pe::ImageInfo::parse` already provides PE headers, sections and imports and is reused by `crates/anyxboxx-pe`. Maintaining independent decoding paths means format fixes and validation changes must now be duplicated across launchers. `AGENTS.md` explicitly requires new Rust code to reuse VIctory's and TomBox's crates instead of reimplementing them. Build the native-specific mapping and binding logic on the existing parser rather than introducing a separate implementation. AGENTS.md reference: [AGENTS.md:L44-L44](https://github.com/LooperSalty/AnyXboxX/blob/7a1bb9efcc66fb66dc1a56a8b49a6f112e66c1b5/AGENTS.md#L44-L44) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 21:24 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a1bb9efcc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 21:24 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/249#pullrequestreview-6065188625) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `7a1bb9efcc` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.