[PR #3321] [MERGED] Registry: a WebAssembly mod's entry may turn native once, keeping the player's .hmod #4901

Closed
opened 2026-11-03 05:08:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3321
Author: @ludovic111
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: feat/official-mods-turn-native


📝 Commits (1)

  • e2f3d1a Registry: a WebAssembly mod's entry may turn native once

📊 Changes

6 files changed (+87 additions, -5 deletions)

View changed files

📝 crates/horizon-mods/src/index/registry.rs (+22 -4)
📝 crates/horizon-mods/src/index/registry/tests.rs (+27 -0)
📝 docs/native-mods.md (+3 -0)
📝 launcher/src/browser/horizon.rs (+11 -1)
📝 launcher/src/browser/horizon/tests.rs (+20 -0)
📝 launcher/src/browser/installed.rs (+4 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

The official mods (Zoom, FPS Counter, Keystrokes, Minimap) are moving from WebAssembly to native mods, each in a native/<name>/ folder of horizon-rust/horizon-mods. Their registry entries will switch from kind = "mod" to "native-mod". Today, two things block that:

  • Review refuses any kind change.
  • The launcher's update deletes the old file. "Update all" would remove a player's working zoom.hmod before they have ever built the game with native mods.

This PR:

  • Review (registry.rs) allows mod → native-mod once, never back, with a note. The entry's old .hmod versions stay published and are still checked as .hmods (file_kind). The index lists only the entry's .hnmod versions.
  • The launcher's update to a native version keeps the player's .hmod. The game keeps running it until a native build has the mod. With the settings-page PR, the game then skips the WebAssembly copy ("Replaced by its native version").
  • Removing the mod removes both files.
  • docs/native-mods.md says so.

Tests: a_mod_may_turn_native_once (registry) and a_mod_that_turned_native_keeps_its_hmod_until_removed (launcher).

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at f66f66c3b, 18 min 15 s)

Check Result
Scope ⚠️ 6 files, +87 −5; mixes game, launcher
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 401 passed (2 min 32 s)
rustfmt ✅ (13 s)
clippy ✅ (6 min 6 s)
tests: horizon-mods ✅ 76 passed (2 min 59 s)
doc tests ✅ 0 passed (1 s)
content root tests ✅ 5 passed (3 min 12 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (1 min 38 s)
launcher tests ✅ 221 passed (6 s)
Parity ➖ 35 affected, to run in CI (no vanilla data here): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, ghost_recipe, hardcore_respawn, hud and 23 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 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/3321 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/official-mods-turn-native` --- ### 📝 Commits (1) - [`e2f3d1a`](https://github.com/horizon-rust/horizon/commit/e2f3d1a85ae0567bc4f19a1ff4cbd98394d4412b) Registry: a WebAssembly mod's entry may turn native once ### 📊 Changes **6 files changed** (+87 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-mods/src/index/registry.rs` (+22 -4) 📝 `crates/horizon-mods/src/index/registry/tests.rs` (+27 -0) 📝 `docs/native-mods.md` (+3 -0) 📝 `launcher/src/browser/horizon.rs` (+11 -1) 📝 `launcher/src/browser/horizon/tests.rs` (+20 -0) 📝 `launcher/src/browser/installed.rs` (+4 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. The official mods (Zoom, FPS Counter, Keystrokes, Minimap) are moving from WebAssembly to native mods, each in a `native/<name>/` folder of horizon-rust/horizon-mods. Their registry entries will switch from `kind = "mod"` to `"native-mod"`. Today, two things block that: - **Review** refuses any kind change. - **The launcher's update** deletes the old file. "Update all" would remove a player's working `zoom.hmod` before they have ever built the game with native mods. This PR: - **Review** (`registry.rs`) allows `mod` → `native-mod` once, never back, with a note. The entry's old `.hmod` versions stay published and are still checked as `.hmod`s (`file_kind`). The index lists only the entry's `.hnmod` versions. - **The launcher's update** to a native version keeps the player's `.hmod`. The game keeps running it until a native build has the mod. With the settings-page PR, the game then skips the WebAssembly copy ("Replaced by its native version"). - **Removing the mod** removes both files. - `docs/native-mods.md` says so. Tests: `a_mod_may_turn_native_once` (registry) and `a_mod_that_turned_native_keeps_its_hmod_until_removed` (launcher). **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at f66f66c3b, 18 min 15 s) | Check | Result | | --- | --- | | Scope | ⚠️ 6 files, +87 −5; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 401 passed (2 min 32 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (6 min 6 s) | | tests: horizon-mods | ✅ 76 passed (2 min 59 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ✅ 5 passed (3 min 12 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (1 min 38 s) | | launcher tests | ✅ 221 passed (6 s) | | Parity | ➖ 35 affected, to run in CI (no vanilla data here): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, ghost_recipe, hardcore_respawn, hud and 23 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:46 +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#4901
No description provided.