[PR #3351] [MERGED] Crates: remove the WebAssembly mod runtime, its SDK and the official WebAssembly mods #4922

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/3351
Author: @ludovic111
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

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


📝 Commits (10+)

  • e7614d2 Game: WebAssembly code mods don't run any more
  • 0c9a493 Crates: remove the WebAssembly mod runtime, its SDK and the official WebAssembly mods
  • 6e8ee3e Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game
  • b25d588 Merge branch 'draft/remove-wasm-mods-game' into draft/remove-wasm-mods-crates
  • a7f1f70 Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game
  • 2cd11c9 Merge branch 'draft/remove-wasm-mods-game' into draft/remove-wasm-mods-crates
  • 1fb8e84 Merge main into the WebAssembly removal (game)
  • cf558b0 Merge the game branch (main 1b38710) into the crate removal
  • 26f099d Merge main (d009ebd) into the WebAssembly removal (game)
  • 2fb276d Merge the game branch (main d009ebd) into the crate removal

📊 Changes

109 files changed (+215 additions, -13038 deletions)

View changed files

📝 .github/workflows/ci.yml (+5 -6)
📝 .github/workflows/game-build.yml (+3 -5)
📝 Cargo.lock (+5 -815)
📝 Cargo.toml (+0 -13)
📝 crates/cargo-horizon-mod/Cargo.toml (+2 -2)
📝 crates/cargo-horizon-mod/src/check.rs (+18 -167)
📝 crates/cargo-horizon-mod/src/main.rs (+38 -196)
➖ crates/cargo-horizon-mod/template/Cargo.toml.in (+0 -14)
➖ crates/cargo-horizon-mod/template/horizon-mod.toml (+0 -12)
➖ crates/cargo-horizon-mod/template/src/lib.rs (+0 -19)
➖ crates/cargo-horizon-mod/template/tests/hello.toml (+0 -14)
📝 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)

...and 80 more files

📄 Description

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

Removal of WebAssembly mods, part 2 of 3: crates, SDK and tooling (stacked on #3350).

  • Removed (about 9,900 lines, mostly deletions):
    • horizon-mods' runtime, commands and test harness, with wasmtime, wit-component and wit-parser;
    • crates/horizon-mod-sdk (the WIT contract and its 4 examples);
    • the sandbox's guest crates;
    • mods/official/* (the official mods are native now, one native/<name>/ folder each in horizon-rust/horizon-mods);
    • the sandbox and API-reference tests.
  • Kept:
    • horizon-mods: content mods, modpacks and the registry index (api_level still reads published .hmod files);
    • cargo horizon-mod for content mods: new has only the content template, build refuses a crate ("code mods are native now"), check refuses a .hmod with code (a new submission) and points to docs/native-mods.md, and the registry subcommands are unchanged (published entries are only inspected, so they stay);
    • test (the sandbox) is gone.
  • CI no longer installs the wasm32 target, and pr_ready's features follow. This also ends the macOS link issue with the guest cdylibs (#1446).

Checked: cargo check --workspace --all-targets and clippy -D warnings pass, and so do the tests of horizon-mods (index), cargo-horizon-mod and horizon-port-pack. Cargo.lock only loses packages.

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 0c9a493); 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).

Rebased with no conflicts; Cargo.lock passes cargo metadata --locked.

pr_ready --quick on 0c9a493

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

Check Result
Scope ⚠️ 108 files, +205 −12917; 10691 lines of code: over 500, split it if it can ship in parts; mixes CI, game
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 408 passed (1 min 4 s)
rustfmt ✅ (4 s)
clippy ✅ (16 s)
tests: workspace ✅ 2332 passed (3 min 8 s)
doc tests ✅ 0 passed (5 s)
content root tests ✅ 5 passed (59 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (6 s)
launcher tests ✅ 249 passed (11 s)
Parity ➖ 348 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 336 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/3351 **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-crates` --- ### 📝 Commits (10+) - [`e7614d2`](https://github.com/horizon-rust/horizon/commit/e7614d2197ebe9ffdaa75e1bbb432dc0ce855e70) Game: WebAssembly code mods don't run any more - [`0c9a493`](https://github.com/horizon-rust/horizon/commit/0c9a49390ed1cac596e7db45c7d6d8e18e988db9) Crates: remove the WebAssembly mod runtime, its SDK and the official WebAssembly mods - [`6e8ee3e`](https://github.com/horizon-rust/horizon/commit/6e8ee3ed07d00f001ab9dcceaba52c3cd7725ccc) Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game - [`b25d588`](https://github.com/horizon-rust/horizon/commit/b25d588c91866c3d73168751435d0d8ae9e1b8f3) Merge branch 'draft/remove-wasm-mods-game' into draft/remove-wasm-mods-crates - [`a7f1f70`](https://github.com/horizon-rust/horizon/commit/a7f1f70508930f10fb21745ff6e1f0e41ba6894b) Merge remote-tracking branch 'origin/main' into draft/remove-wasm-mods-game - [`2cd11c9`](https://github.com/horizon-rust/horizon/commit/2cd11c926fba6720dbee5a0f06cb3d850b2f63d8) Merge branch 'draft/remove-wasm-mods-game' into draft/remove-wasm-mods-crates - [`1fb8e84`](https://github.com/horizon-rust/horizon/commit/1fb8e845617220a78898b3bdf107a6688aa760c0) Merge main into the WebAssembly removal (game) - [`cf558b0`](https://github.com/horizon-rust/horizon/commit/cf558b0c0a161dd4f380216ca403f329f5205f9d) Merge the game branch (main 1b38710) into the crate removal - [`26f099d`](https://github.com/horizon-rust/horizon/commit/26f099d16802089a5c9322ef5d90fb9f2d89483f) Merge main (d009ebd) into the WebAssembly removal (game) - [`2fb276d`](https://github.com/horizon-rust/horizon/commit/2fb276d5f6f559b28b0a64c1d211e1ad77adfcf6) Merge the game branch (main d009ebd) into the crate removal ### 📊 Changes **109 files changed** (+215 additions, -13038 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+5 -6) 📝 `.github/workflows/game-build.yml` (+3 -5) 📝 `Cargo.lock` (+5 -815) 📝 `Cargo.toml` (+0 -13) 📝 `crates/cargo-horizon-mod/Cargo.toml` (+2 -2) 📝 `crates/cargo-horizon-mod/src/check.rs` (+18 -167) 📝 `crates/cargo-horizon-mod/src/main.rs` (+38 -196) ➖ `crates/cargo-horizon-mod/template/Cargo.toml.in` (+0 -14) ➖ `crates/cargo-horizon-mod/template/horizon-mod.toml` (+0 -12) ➖ `crates/cargo-horizon-mod/template/src/lib.rs` (+0 -19) ➖ `crates/cargo-horizon-mod/template/tests/hello.toml` (+0 -14) 📝 `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) _...and 80 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Removal of WebAssembly mods, part 2 of 3: **crates, SDK and tooling** (stacked on #3350). - **Removed** (about 9,900 lines, mostly deletions): - `horizon-mods`' runtime, commands and test harness, with wasmtime, wit-component and wit-parser; - `crates/horizon-mod-sdk` (the WIT contract and its 4 examples); - the sandbox's guest crates; - `mods/official/*` (the official mods are native now, one `native/<name>/` folder each in horizon-rust/horizon-mods); - the sandbox and API-reference tests. - **Kept**: - `horizon-mods`: content mods, modpacks and the registry index (`api_level` still reads published `.hmod` files); - `cargo horizon-mod` for content mods: `new` has only the content template, `build` refuses a crate ("code mods are native now"), `check` refuses a `.hmod` with code (a new submission) and points to docs/native-mods.md, and the `registry` subcommands are unchanged (published entries are only inspected, so they stay); - `test` (the sandbox) is gone. - CI no longer installs the wasm32 target, and pr_ready's features follow. This also ends the macOS link issue with the guest cdylibs (#1446). Checked: `cargo check --workspace --all-targets` and clippy `-D warnings` pass, and so do the tests of horizon-mods (index), cargo-horizon-mod and horizon-port-pack. Cargo.lock only loses packages. **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 `0c9a493`); 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). Rebased with no conflicts; `Cargo.lock` passes `cargo metadata --locked`. <details><summary>pr_ready --quick on 0c9a493</summary> **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 62a01db8f, 5 min 54 s) | Check | Result | | --- | --- | | Scope | ⚠️ 108 files, +205 −12917; 10691 lines of code: over 500, split it if it can ship in parts; mixes CI, game | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 408 passed (1 min 4 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (16 s) | | tests: workspace | ✅ 2332 passed (3 min 8 s) | | doc tests | ✅ 0 passed (5 s) | | content root tests | ✅ 5 passed (59 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (6 s) | | launcher tests | ✅ 249 passed (11 s) | | Parity | ➖ 348 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 336 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) --- <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#4922
No description provided.