[PR #6462] [MERGED] Native mods: export a headless engine for dedicated servers #6891

Closed
opened 2026-11-03 06:28:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6462
Author: @wxundup
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: feat/native-dedicated-export


📝 Commits (2)

📊 Changes

15 files changed (+1063 additions, -127 deletions)

View changed files

📝 docs/hosting.md (+15 -0)
📝 docs/native-mods.md (+49 -1)
📝 launcher/lang/de.json (+11 -1)
📝 launcher/lang/es.json (+11 -1)
📝 launcher/lang/fr.json (+11 -1)
📝 launcher/lang/ja.json (+11 -1)
📝 launcher/lang/pl.json (+11 -1)
📝 launcher/lang/pt-br.json (+11 -1)
📝 launcher/lang/ru.json (+11 -1)
📝 launcher/lang/tr.json (+11 -1)
📝 launcher/lang/uk.json (+11 -1)
📝 launcher/lang/zh.json (+11 -1)
📝 launcher/src/cli.rs (+168 -4)
📝 launcher/src/native_mods.rs (+637 -84)
📝 launcher/src/rust_toolchain.rs (+84 -28)

📄 Description

🤖 Opened by wxundup's AI agent (T3 Code / Codex, gpt-6.1-sol), not by wxundup personally.

What and why

Native mods can already hook dedicated-server gameplay, but the launcher only builds and selects player instances. Add horizon-launcher native-build FOLDER --server-output DIR --version TAG --trust-native-code to compile the same bundles into a headless horizon-engine and export an independent runtime folder.

The client and server share the existing source, mixins, toolchain, compile, and post-build pipeline. Server builds use --no-default-features, distinct build identities and records, and a cache outside playable versions. Exports preserve executable permissions, prepared resources, mod data, and provenance; reject existing destinations and managed launcher folders; and survive cache removal. Server builds do not select or edit an instance. Linux preflight checks only the compiler and headers for headless builds.

Point [engine] path at the printed engine path. Documentation covers developer verification and manual rebuilds/rollback, and the new messages have all ten launcher translations.

Part of #6304, implementing the same-platform launcher-export route. This does not close the broader proposal: a server-managed shared build crate, automatic rebuilds during updates, native-mod join compatibility checks, and cross compilation remain follow-up work. It uses the existing dedicated hooks and does not change gameplay or horizon-mixins.

Kind

  • parity
  • bug
  • perf
  • feature: export native-mod engines for dedicated servers
  • extra
  • tooling
  • docs

Vanilla reference

Horizon-only build and hosting feature. Existing dedicated-server lifecycle and network hooks are reused.

Other projects' code

None copied or adapted. Speak's public README and compatibility metadata were read as context, not its implementation. Its README describes codec and encryption stubs, so this PR does not claim working Speak voice chat or end-to-end Speak compatibility.

Review and validation

  • Parent reviewed the complete change and corrected a missing translation import, contradictory parser test, server cache visibility, export permissions/cleanup, managed-folder protection, and headless preflight behavior.
  • Required Sol review (gpt-6.1-sol, high) found missing locale keys. Added them to all ten tables and passed the existing completeness/placeholder checks. Sol's own command verification was limited by its read-only sandbox.
  • 54 targeted Rust tests passed: native build/export (30), toolchain (10), CLI (9), and i18n (5).
  • GUI-independent Clippy passed with -D warnings. To bypass missing Apple Metal tooling, a temporary manifest outside the repository used the actual launcher library with only gpui and gpui_platform dependencies omitted. A temporary binary compiled the actual cli.rs, with only its unrelated MCP/performance entry points stubbed. Original source and fixture paths were retained. This is supplemental verification, not a full launcher build; the temporary harness is not committed.
  • Formatting, public-tree checks, and 594 Python tests passed. All launcher tests used fresh scratch data/config homes.
  • Normal launcher tests and Clippy remain unverified locally. Without Metal, pr_ready.py requests gpui/runtime_shaders, which pinned gpui-fast 0.1.12 does not provide. Building without the fallback fails in the Apple dependency because the Metal compiler is absent. No system component was installed or dependency changed to hide this.
  • No trusted native bundle was executed, no complete modded-server build/start or Speak voice session was run, and no cross-platform runtime claim is made. Maintainer/CI validation is still needed for those paths.

Self-check

The gate output below was captured before two final failure-path assertions were added. The native-build tests, formatter, and supplemental Clippy were then rerun successfully.

pr_ready (tools/pr_ready.py --quick on Mac, against origin/main at cfc7278a4, 40 s)

Check Result
Scope ⚠️ 15 files, +1045 −127; 1106 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (39 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
Rust ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
launcher clippy ❌ failed; likely the old Rust above
launcher tests ❌ failed
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with T3 Code / Codex, with OpenCode subagents (GLM 5.3 and Nemotron 3.5 Super VL Free).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6462 **Author:** [@wxundup](https://github.com/wxundup) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/native-dedicated-export` --- ### 📝 Commits (2) - [`fcae565`](https://github.com/horizon-rust/horizon/commit/fcae565042e694cb49dcc024bb6d255572bf1a64) Add dedicated native-mod engine build and export - [`f632e8c`](https://github.com/horizon-rust/horizon/commit/f632e8c4af1767800c11672613894e04fb4b33f1) Merge main into #6462 ### 📊 Changes **15 files changed** (+1063 additions, -127 deletions) <details> <summary>View changed files</summary> 📝 `docs/hosting.md` (+15 -0) 📝 `docs/native-mods.md` (+49 -1) 📝 `launcher/lang/de.json` (+11 -1) 📝 `launcher/lang/es.json` (+11 -1) 📝 `launcher/lang/fr.json` (+11 -1) 📝 `launcher/lang/ja.json` (+11 -1) 📝 `launcher/lang/pl.json` (+11 -1) 📝 `launcher/lang/pt-br.json` (+11 -1) 📝 `launcher/lang/ru.json` (+11 -1) 📝 `launcher/lang/tr.json` (+11 -1) 📝 `launcher/lang/uk.json` (+11 -1) 📝 `launcher/lang/zh.json` (+11 -1) 📝 `launcher/src/cli.rs` (+168 -4) 📝 `launcher/src/native_mods.rs` (+637 -84) 📝 `launcher/src/rust_toolchain.rs` (+84 -28) </details> ### 📄 Description > 🤖 Opened by wxundup's AI agent (T3 Code / Codex, gpt-6.1-sol), not by wxundup personally. ## What and why Native mods can already hook dedicated-server gameplay, but the launcher only builds and selects player instances. Add `horizon-launcher native-build FOLDER --server-output DIR --version TAG --trust-native-code` to compile the same bundles into a headless `horizon-engine` and export an independent runtime folder. The client and server share the existing source, mixins, toolchain, compile, and post-build pipeline. Server builds use `--no-default-features`, distinct build identities and records, and a cache outside playable versions. Exports preserve executable permissions, prepared resources, mod data, and provenance; reject existing destinations and managed launcher folders; and survive cache removal. Server builds do not select or edit an instance. Linux preflight checks only the compiler and headers for headless builds. Point `[engine] path` at the printed engine path. Documentation covers developer verification and manual rebuilds/rollback, and the new messages have all ten launcher translations. Part of #6304, implementing the same-platform launcher-export route. This does not close the broader proposal: a server-managed shared build crate, automatic rebuilds during updates, native-mod join compatibility checks, and cross compilation remain follow-up work. It uses the existing dedicated hooks and does not change gameplay or horizon-mixins. ## Kind - [ ] parity - [ ] bug - [ ] perf - [x] feature: export native-mod engines for dedicated servers - [ ] extra - [ ] tooling - [ ] docs ## Vanilla reference Horizon-only build and hosting feature. Existing dedicated-server lifecycle and network hooks are reused. ## Other projects' code None copied or adapted. Speak's public README and compatibility metadata were read as context, not its implementation. Its README describes codec and encryption stubs, so this PR does not claim working Speak voice chat or end-to-end Speak compatibility. ## Review and validation - Parent reviewed the complete change and corrected a missing translation import, contradictory parser test, server cache visibility, export permissions/cleanup, managed-folder protection, and headless preflight behavior. - Required Sol review (gpt-6.1-sol, high) found missing locale keys. Added them to all ten tables and passed the existing completeness/placeholder checks. Sol's own command verification was limited by its read-only sandbox. - **54 targeted Rust tests passed:** native build/export (30), toolchain (10), CLI (9), and i18n (5). - **GUI-independent Clippy passed with `-D warnings`.** To bypass missing Apple Metal tooling, a temporary manifest outside the repository used the actual launcher library with only `gpui` and `gpui_platform` dependencies omitted. A temporary binary compiled the actual `cli.rs`, with only its unrelated MCP/performance entry points stubbed. Original source and fixture paths were retained. This is supplemental verification, not a full launcher build; the temporary harness is not committed. - Formatting, public-tree checks, and **594 Python tests passed**. All launcher tests used fresh scratch data/config homes. - **Normal launcher tests and Clippy remain unverified locally.** Without Metal, `pr_ready.py` requests `gpui/runtime_shaders`, which pinned `gpui-fast 0.1.12` does not provide. Building without the fallback fails in the Apple dependency because the Metal compiler is absent. No system component was installed or dependency changed to hide this. - No trusted native bundle was executed, no complete modded-server build/start or Speak voice session was run, and no cross-platform runtime claim is made. Maintainer/CI validation is still needed for those paths. ## Self-check The gate output below was captured before two final failure-path assertions were added. The native-build tests, formatter, and supplemental Clippy were then rerun successfully. **pr_ready** (`tools/pr_ready.py --quick` on Mac, against origin/main at cfc7278a4, 40 s) | Check | Result | | --- | --- | | Scope | ⚠️ 15 files, +1045 −127; 1106 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (39 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | launcher clippy | ❌ failed; likely the old Rust above | | launcher tests | ❌ failed | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [T3 Code](https://t3.codes) / [Codex](https://openai.com/codex/), with OpenCode subagents (GLM 5.3 and Nemotron 3.5 Super VL Free). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:28:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6891
No description provided.