[PR #3350] [MERGED] Game: WebAssembly mods no longer load; the official ones are native now #4921

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

📋 Pull Request Information

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

Base: main ← Head: draft/remove-wasm-mods-game


📝 Commits (6)

  • e7614d2 Game: WebAssembly code mods don't run any more
  • 6e8ee3e Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game
  • a7f1f70 Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game
  • 1fb8e84 Merge main into the WebAssembly removal (game)
  • 26f099d Merge main (d009ebd) into the WebAssembly removal (game)
  • ab03095 Merge main (c7065027b) into the WebAssembly removal (game)

📊 Changes

33 files changed (+145 additions, -3105 deletions)

View changed files

📝 .github/workflows/ci.yml (+4 -4)
📝 .github/workflows/game-build.yml (+3 -5)
📝 crates/horizon-client-render/src/extras.rs (+5 -6)
📝 crates/horizon-client-render/src/mod_list.rs (+1 -5)
📝 crates/horizon-client-render/src/options_ui.rs (+6 -16)
📝 crates/horizon-client/Cargo.toml (+0 -3)
📝 crates/horizon-client/src/game.rs (+6 -71)
📝 crates/horizon-client/src/game/agent.rs (+0 -1)
📝 crates/horizon-client/src/game/chat.rs (+16 -26)
📝 crates/horizon-client/src/game/command_blocks.rs (+6 -6)
📝 crates/horizon-client/src/game/control.rs (+1 -9)
📝 crates/horizon-client/src/game/extras.rs (+9 -27)
📝 crates/horizon-client/src/game/lan.rs (+1 -3)
📝 crates/horizon-client/src/game/lan_actions.rs (+0 -4)
📝 crates/horizon-client/src/game/levels.rs (+0 -13)
➖ crates/horizon-client/src/game/mod_input.rs (+0 -212)
➖ crates/horizon-client/src/game/mod_panel.rs (+0 -114)
➖ crates/horizon-client/src/game/mod_render.rs (+0 -194)
📝 crates/horizon-client/src/game/mods.rs (+55 -1219)
➖ crates/horizon-client/src/game/moved_extras.rs (+0 -122)

...and 13 more files

📄 Description

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

Release note: WebAssembly mods no longer load; the official ones are native now.

Read this first: players lose these mods

With this stack (#3350 → #3351 → #3353 → #3371), a WebAssembly code mod (an .hmod with code) no longer loads. Content-only .hmod mods are not affected. Horizon's five official mods are already native in the registry: Zoom, FPS Counter, Keystrokes, Minimap and Recipes (horizon-mods#26 and #38). The SDK's example, Coordinates HUD, turns native in horizon-mods#39, to merge before this stack. Players who installed one of the WebAssembly mods below lose it until its author publishes a native version. The mod's file stays, and Options > Mods says "Doesn't run any more: needs a native port".

WebAssembly code mods in the published registry with no native version yet:

Mod Author (owner) Status Told
blockscope (Block Scope) Domanffe no native version horizon-mods#25
classic_zoom (Classic Zoom) Surge (SU4G3) no native version horizon-mods#36
compass_bar (Compass Enhanced) Isaac (Fernandes585) no native version horizon-mods#23
mod_menu (Mod Menu) levzzz5154 no native version comment on horizon-mods@25fb233
lookat (LookAt) d3grando native 0.2.1 open in horizon-mods#31 horizon-mods#31
coords_hud (Coordinates HUD) Horizon ours: native 2.0.0 in horizon-mods#39 (merge it before this stack); the time of day line is dropped (ours)

Each author's note points to the native mod docs (playhorizon.dev/docs/make-a-mod and /docs/mod-code). It also says that turning an entry native takes a pull request by hand for now, since the form can't change a project's kind. The open submission horizon-mods#35 (Waypoints, Web-mc1) is a WebAssembly mod too and got the same note.

What this PR does

Removal of WebAssembly mods, part 1 of 3: the game (stacked on #3346; next: crates/SDK, then launcher).

  • Drops the mods feature (wasmtime and cranelift) and everything the runtime fed:
    • the mods' tick, frame, chat and command hooks;
    • HUD panels and mod screens;
    • the item panel and its recipes;
    • claimed item use, camera shakes and far terrain;
    • server mods;
    • moved_extras (installing the WebAssembly official mods for players who had the old extras on).
  • About 4,000 lines go. Every hook had a no-op stub for builds without mods, and that build is what the tests and probes already compile.
  • Content mods (blocks, items, data and assets in a .hmod) load as before, and so does --dev-mod.
  • What a player with a WebAssembly code mod sees:
    • its row in Options > Mods says "Doesn't run any more: needs a native port", or "Replaced by its native version" when its native version is built in;
    • once, in the first world after the update, one chat line: "Horizon mods are native now: Zoom, … stopped running until they have a native version. The launcher's Mods page has the native ones.", recorded in horizon-mods/.native-notice;
    • the mod's files stay where they are.
  • CI, game-build and pr_ready no longer pass --features horizon-client/mods.

Checked: clippy -D warnings and cargo test -p horizon-client --lib --bins --tests (1100+ tests) pass.

Checks on the stack (tip #3371, main c7065027b)

The stack is brought up to date with main by merges (no rebase), last at c7065027b. Each layer compiles: cargo check --workspace --all-targets --locked, and the launcher's own workspace.

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

Check Result
Scope ⚠️ 131 files, +537 −14714; 10975 lines of code: over 500, split it if it can ship in parts; mixes CI, game, launcher
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 423 passed (3 min 56 s)
rustfmt ✅ (16 s)
clippy ❌ failed (20 s)
tests: workspace ❌ 689 passed, 1 failed (3 min 10 s)
doc tests ✅ 0 passed (9 s)
content root tests ✅ 5 passed (4 min 30 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (1 min 47 s)
launcher tests ✅ 275 passed (4 min 18 s)
Parity ➖ 353 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 341 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The two ❌ are main's, not this stack's; both fail on main c7065027b alone:

  • clippy: log_display in crates/horizon-client-render/src/gfx.rs is dead code on macOS (its only caller is #[cfg(target_os = "linux")], from #3461). The stack doesn't touch gfx.rs.
  • entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed fails on main too when .local has the prepared data (add_effect("glowing") stores minecraft:glowing, has_effect("glowing") looks for the bare id; added in 027ac3cdf).

Parity: on the previous heads (main 87a6a7a), all 340 affected harnesses passed locally, none failed. CI parity runs on these heads.

Conditions, all met

  1. Hook points and settings pages (#3345, #3346), the launcher building mods on the hook points (#3323), registry entries that may turn native (#3321) and the settings carry-over: merged and released.
  2. The official entries are native and live: Zoom, FPS Counter, Keystrokes and Minimap (horizon-mods#26) and Recipes (horizon-mods#38). The index lists recipes as native-mod 2.0.0, with its file served from the recipes-2.0.0 release and the SHA-256 verified.
  3. Installing a native mod turns native mods on (#3596).
  4. Recipes is native, on hook points v2 (#3435, Nightly 4baa571).

The stack is brought up to date with merges of main, not rebases.

Earlier status notes

Draft until (players never lose their mods):

  1. #3345 + #3346 (hook points, settings page), #3323 (launcher builds mods on the hook points), #3321 (registry entries may turn native) and the settings carry-over PR are merged and released.
  2. The official entries in horizon-rust/horizon-mods are switched to the native repos (native/{zoom,fps-overlay,keystrokes,minimap} in horizon-rust/horizon-mods) and live.
  3. Native mods are on by default in the launcher (today they are experimental and opt-in): until then, a player who doesn't build would lose Zoom & co.
  4. Recipes has a native port (it needs hook points v2: the item panel and recipe pages).

Then: rebase, tools/pr_ready.py (not run yet: this stack will be rebased before it can merge), mark ready.

Status 2026-10-29 (agent)

Rebased onto main 62a01db (stack head e7614d2); still a draft. The official mods' switch is live: horizon-mods#26 made Zoom, FPS Counter, Keystrokes and Minimap native-mod 2.0.0 on Nightly 6f8c7a0 (index checked; launcher 0.2.23 installs and builds Zoom 2.0.0 on fresh data, and its proof passes on that build). Still open before ready: Recipes' switch (native/recipes waits for a Nightly with horizon#3435), and native mods on by default in the launcher (item 3 of #3350's list).

The rebase met hook points v2 (#3434/#3435), which moved the item panel and the recipe tables into native_panel.rs, native_panel_recipes.rs and native_recipes.rs for native mods:

  • Those files stay (main's), without their WebAssembly branches: Owner::Wasm, the WebAssembly panel, mod_recipes and its conversion, the test of both kinds.
  • mod_panel.rs (the WebAssembly adapter) and mod_input.rs go.
  • recipe_book_entries, recipe_book_displays, mod_recipe_screen and mod_place_recipe stay: native_recipes.rs uses them.
  • The panel's six call sites (draw, close, the two presses, the search box's keys and typed text), which this draft had removed as WebAssembly code, are back as on main.
pr_ready --quick on e7614d2

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 62a01db8f, 3 min 50 s)

Check Result
Scope ⚠️ 32 files, +135 −2987; 3116 lines of code: over 500, split it if it can ship in parts; mixes CI, game
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed (45 s)
rustfmt ✅ (3 s)
clippy ✅ (43 s)
tests: horizon-client, horizon-client-render ✅ 1288 passed (1 min 56 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (5 s)
launcher tests ✅ 249 passed (11 s)
Parity ➖ 122 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 110 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/3350 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `draft/remove-wasm-mods-game` --- ### 📝 Commits (6) - [`e7614d2`](https://github.com/horizon-rust/horizon/commit/e7614d2197ebe9ffdaa75e1bbb432dc0ce855e70) Game: WebAssembly code mods don't run any more - [`6e8ee3e`](https://github.com/horizon-rust/horizon/commit/6e8ee3ed07d00f001ab9dcceaba52c3cd7725ccc) Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game - [`a7f1f70`](https://github.com/horizon-rust/horizon/commit/a7f1f70508930f10fb21745ff6e1f0e41ba6894b) Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game - [`1fb8e84`](https://github.com/horizon-rust/horizon/commit/1fb8e845617220a78898b3bdf107a6688aa760c0) Merge main into the WebAssembly removal (game) - [`26f099d`](https://github.com/horizon-rust/horizon/commit/26f099d16802089a5c9322ef5d90fb9f2d89483f) Merge main (d009ebd) into the WebAssembly removal (game) - [`ab03095`](https://github.com/horizon-rust/horizon/commit/ab0309581cd8ede53c5be42fbee9a6ccc20adf2a) Merge main (c7065027b) into the WebAssembly removal (game) ### 📊 Changes **33 files changed** (+145 additions, -3105 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+4 -4) 📝 `.github/workflows/game-build.yml` (+3 -5) 📝 `crates/horizon-client-render/src/extras.rs` (+5 -6) 📝 `crates/horizon-client-render/src/mod_list.rs` (+1 -5) 📝 `crates/horizon-client-render/src/options_ui.rs` (+6 -16) 📝 `crates/horizon-client/Cargo.toml` (+0 -3) 📝 `crates/horizon-client/src/game.rs` (+6 -71) 📝 `crates/horizon-client/src/game/agent.rs` (+0 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+16 -26) 📝 `crates/horizon-client/src/game/command_blocks.rs` (+6 -6) 📝 `crates/horizon-client/src/game/control.rs` (+1 -9) 📝 `crates/horizon-client/src/game/extras.rs` (+9 -27) 📝 `crates/horizon-client/src/game/lan.rs` (+1 -3) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+0 -4) 📝 `crates/horizon-client/src/game/levels.rs` (+0 -13) ➖ `crates/horizon-client/src/game/mod_input.rs` (+0 -212) ➖ `crates/horizon-client/src/game/mod_panel.rs` (+0 -114) ➖ `crates/horizon-client/src/game/mod_render.rs` (+0 -194) 📝 `crates/horizon-client/src/game/mods.rs` (+55 -1219) ➖ `crates/horizon-client/src/game/moved_extras.rs` (+0 -122) _...and 13 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Release note:** WebAssembly mods no longer load; the official ones are native now. ## Read this first: players lose these mods With this stack (#3350 → #3351 → #3353 → #3371), a WebAssembly code mod (an `.hmod` with code) no longer loads. Content-only `.hmod` mods are not affected. Horizon's five official mods are already native in the registry: Zoom, FPS Counter, Keystrokes, Minimap and Recipes (horizon-mods#26 and #38). The SDK's example, Coordinates HUD, turns native in horizon-mods#39, to merge before this stack. Players who installed one of the WebAssembly mods below lose it until its author publishes a native version. The mod's file stays, and Options > Mods says "Doesn't run any more: needs a native port". WebAssembly code mods in the published registry with no native version yet: | Mod | Author (owner) | Status | Told | |---|---|---|---| | `blockscope` (Block Scope) | Domanffe | no native version | horizon-mods#25 | | `classic_zoom` (Classic Zoom) | Surge (SU4G3) | no native version | horizon-mods#36 | | `compass_bar` (Compass Enhanced) | Isaac (Fernandes585) | no native version | horizon-mods#23 | | `mod_menu` (Mod Menu) | levzzz5154 | no native version | comment on horizon-mods@25fb233 | | `lookat` (LookAt) | d3grando | native 0.2.1 open in horizon-mods#31 | horizon-mods#31 | | `coords_hud` (Coordinates HUD) | Horizon | ours: native 2.0.0 in horizon-mods#39 (merge it before this stack); the time of day line is dropped | (ours) | Each author's note points to the native mod docs (playhorizon.dev/docs/make-a-mod and /docs/mod-code). It also says that turning an entry native takes a pull request by hand for now, since the form can't change a project's kind. The open submission horizon-mods#35 (Waypoints, Web-mc1) is a WebAssembly mod too and got the same note. ## What this PR does Removal of WebAssembly mods, part 1 of 3: **the game** (stacked on #3346; next: crates/SDK, then launcher). - Drops the `mods` feature (wasmtime and cranelift) and everything the runtime fed: - the mods' tick, frame, chat and command hooks; - HUD panels and mod screens; - the item panel and its recipes; - claimed item use, camera shakes and far terrain; - server mods; - `moved_extras` (installing the WebAssembly official mods for players who had the old extras on). - About 4,000 lines go. Every hook had a no-op stub for builds without `mods`, and that build is what the tests and probes already compile. - **Content mods** (blocks, items, data and assets in a `.hmod`) load as before, and so does `--dev-mod`. - **What a player with a WebAssembly code mod sees:** - its row in Options > Mods says "Doesn't run any more: needs a native port", or "Replaced by its native version" when its native version is built in; - once, in the first world after the update, one chat line: "Horizon mods are native now: Zoom, … stopped running until they have a native version. The launcher's Mods page has the native ones.", recorded in `horizon-mods/.native-notice`; - the mod's files stay where they are. - CI, game-build and pr_ready no longer pass `--features horizon-client/mods`. Checked: clippy `-D warnings` and `cargo test -p horizon-client --lib --bins --tests` (1100+ tests) pass. ## Checks on the stack (tip #3371, main c7065027b) The stack is brought up to date with main by merges (no rebase), last at c7065027b. Each layer compiles: `cargo check --workspace --all-targets --locked`, and the launcher's own workspace. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at c7065027b, 18 min 30 s) | Check | Result | | --- | --- | | Scope | ⚠️ 131 files, +537 −14714; 10975 lines of code: over 500, split it if it can ship in parts; mixes CI, game, launcher | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 423 passed (3 min 56 s) | | rustfmt | ✅ (16 s) | | clippy | ❌ failed (20 s) | | tests: workspace | ❌ 689 passed, 1 failed (3 min 10 s) | | doc tests | ✅ 0 passed (9 s) | | content root tests | ✅ 5 passed (4 min 30 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (1 min 47 s) | | launcher tests | ✅ 275 passed (4 min 18 s) | | Parity | ➖ 353 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 341 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The two ❌ are main's, not this stack's; both fail on main c7065027b alone: - clippy: `log_display` in `crates/horizon-client-render/src/gfx.rs` is dead code on macOS (its only caller is `#[cfg(target_os = "linux")]`, from #3461). The stack doesn't touch `gfx.rs`. - `entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed` fails on main too when `.local` has the prepared data (`add_effect("glowing")` stores `minecraft:glowing`, `has_effect("glowing")` looks for the bare id; added in 027ac3cdf). Parity: on the previous heads (main 87a6a7a), all 340 affected harnesses passed locally, none failed. CI parity runs on these heads. ## Conditions, all met 1. Hook points and settings pages (#3345, #3346), the launcher building mods on the hook points (#3323), registry entries that may turn native (#3321) and the settings carry-over: merged and released. 2. The official entries are native and live: Zoom, FPS Counter, Keystrokes and Minimap (horizon-mods#26) and Recipes (horizon-mods#38). The index lists `recipes` as `native-mod` 2.0.0, with its file served from the `recipes-2.0.0` release and the SHA-256 verified. 3. Installing a native mod turns native mods on (#3596). 4. Recipes is native, on hook points v2 (#3435, Nightly 4baa571). The stack is brought up to date with **merges** of main, not rebases. <details><summary>Earlier status notes</summary> **Draft until** (players never lose their mods): 1. #3345 + #3346 (hook points, settings page), #3323 (launcher builds mods on the hook points), #3321 (registry entries may turn native) and the settings carry-over PR are merged and released. 2. The official entries in horizon-rust/horizon-mods are switched to the native repos (`native/{zoom,fps-overlay,keystrokes,minimap}` in horizon-rust/horizon-mods) and live. 3. Native mods are on by default in the launcher (today they are experimental and opt-in): until then, a player who doesn't build would lose Zoom & co. 4. Recipes has a native port (it needs hook points v2: the item panel and recipe pages). Then: rebase, `tools/pr_ready.py` (not run yet: this stack will be rebased before it can merge), mark ready. ## Status 2026-10-29 (agent) Rebased onto main `62a01db` (stack head `e7614d2`); still a draft. The official mods' switch is live: horizon-mods#26 made Zoom, FPS Counter, Keystrokes and Minimap native-mod 2.0.0 on Nightly `6f8c7a0` (index checked; launcher 0.2.23 installs and builds Zoom 2.0.0 on fresh data, and its proof passes on that build). Still open before ready: **Recipes' switch** (native/recipes waits for a Nightly with horizon#3435), and native mods on by default in the launcher (item 3 of #3350's list). The rebase met hook points v2 (#3434/#3435), which moved the item panel and the recipe tables into `native_panel.rs`, `native_panel_recipes.rs` and `native_recipes.rs` for native mods: - Those files stay (main's), without their WebAssembly branches: `Owner::Wasm`, the WebAssembly panel, `mod_recipes` and its conversion, the test of both kinds. - `mod_panel.rs` (the WebAssembly adapter) and `mod_input.rs` go. - `recipe_book_entries`, `recipe_book_displays`, `mod_recipe_screen` and `mod_place_recipe` stay: `native_recipes.rs` uses them. - The panel's six call sites (draw, close, the two presses, the search box's keys and typed text), which this draft had removed as WebAssembly code, are back as on main. <details><summary>pr_ready --quick on e7614d2</summary> **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 62a01db8f, 3 min 50 s) | Check | Result | | --- | --- | | Scope | ⚠️ 32 files, +135 −2987; 3116 lines of code: over 500, split it if it can ship in parts; mixes CI, game | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed (45 s) | | rustfmt | ✅ (3 s) | | clippy | ✅ (43 s) | | tests: horizon-client, horizon-client-render | ✅ 1288 passed (1 min 56 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (5 s) | | launcher tests | ✅ 249 passed (11 s) | | Parity | ➖ 122 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 110 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) </details> --- <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:56 +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#4921
No description provided.