[GH-ISSUE #527] Rustized-Fabric (mod support)? #153

Closed
opened 2026-11-02 15:36:49 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @x-0D on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/527

Suggestion to add modding support by convertation of jar files into wasm modules.

This requires graalvm-like backend to recompile jar into wasm. Suggesting to have two formats at the same time - jar for regular "old" mods, and wasm for "horizon-native" mods. Jar should be converted into wasm, and wasm should run into horizon as-is.

Suggest fabric-first support as it have more cleaner and smarter way to be injected into original game from code perspective. Then build neoforge on top of it - https://github.com/KiltMC

Why not neoforge first? Because fabric port is more easier to start with, that's why we have Syntra connector before KiltMC. Neoforge is a mess, and it's beautiful mess, but need some stronger baseline rails.

Thanks. I think this idea is not original, something just have on top.

Originally created by @x-0D on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/527 Suggestion to add modding support by convertation of jar files into wasm modules. This requires graalvm-like backend to recompile jar into wasm. Suggesting to have two formats at the same time - jar for regular "old" mods, and wasm for "horizon-native" mods. Jar should be converted into wasm, and wasm should run into horizon as-is. Suggest fabric-first support as it have more cleaner and smarter way to be injected into original game from code perspective. Then build neoforge on top of it - https://github.com/KiltMC Why not neoforge first? Because fabric port is more easier to start with, that's why we have Syntra connector before KiltMC. Neoforge is a mess, and it's beautiful mess, but need some stronger baseline rails. Thanks. I think this idea is not original, something just have on top.
Author
Owner

@ludovic111 commented on GitHub (Oct 16, 2026):

Thanks for the detailed suggestion. We looked at exactly this: docs/research/java-mod-compat.md and the new docs/modpacks.md.

Compiling jars to WASM (GraalVM-style) would make the bytecode run, but it wouldn't make the mods work:

  • Nearly every Fabric and NeoForge mod changes the game through Mixins: bytecode patches to Minecraft's own Java classes (InGameHud.render, LivingEntity.tick...). Horizon has no such classes to patch, because the game is reimplemented in Rust.
  • Fabric API and NeoForge themselves are built from those same patches. A translated mod would call into a Minecraft that isn't there.
  • Kilt hits the same wall: it maps NeoForge onto Fabric, and both still need the Java game underneath.

So the plan is porting rather than emulating. A pipeline brings over each mod's data and assets automatically (recipes, loot, models, textures, worldgen). AI agents then port each mod's code to a native Horizon mod (Rust → WASM), each checked against the original mod by a parity test. The doc has the measured breakdown for All the Mods 10 (495 mods) and the Horizon mod API milestones that ports need. The first pieces, block and item registries and the pack import tool, are in review now.

<!-- gh-comment-id:6221088324 --> @ludovic111 commented on GitHub (Oct 16, 2026): Thanks for the detailed suggestion. We looked at exactly this: [docs/research/java-mod-compat.md](https://github.com/ludovic111/horizon/blob/main/docs/research/java-mod-compat.md) and the new [docs/modpacks.md](https://github.com/ludovic111/horizon/blob/main/docs/modpacks.md). Compiling jars to WASM (GraalVM-style) would make the bytecode run, but it wouldn't make the mods work: - Nearly every Fabric and NeoForge mod changes the game through **Mixins**: bytecode patches to Minecraft's own Java classes (`InGameHud.render`, `LivingEntity.tick`...). Horizon has no such classes to patch, because the game is reimplemented in Rust. - Fabric API and NeoForge themselves are built from those same patches. A translated mod would call into a Minecraft that isn't there. - Kilt hits the same wall: it maps NeoForge onto Fabric, and both still need the Java game underneath. So the plan is **porting rather than emulating**. A pipeline brings over each mod's data and assets automatically (recipes, loot, models, textures, worldgen). AI agents then port each mod's code to a native Horizon mod (Rust → WASM), each checked against the original mod by a parity test. The doc has the measured breakdown for All the Mods 10 (495 mods) and the Horizon mod API milestones that ports need. The first pieces, block and item registries and the pack import tool, are in review now.
Author
Owner

@ludovic111 commented on GitHub (Oct 21, 2026):

🤖 Agent: thanks x-0D. Loading Fabric/NeoForge jars isn't planned. As explained above (docs/research/java-mod-compat.md), those mods patch Minecraft's own Java classes through Mixins, and Horizon doesn't have those classes. The route Horizon takes is porting: mods' data and assets are imported automatically, and their code is ported to native Horizon mods (Rust → WASM) with a parity test against the original. That's described in docs/modpacks.md. Closing as not planned.

<!-- gh-comment-id:6313528664 --> @ludovic111 commented on GitHub (Oct 21, 2026): 🤖 Agent: thanks x-0D. Loading Fabric/NeoForge jars isn't planned. As explained above (docs/research/java-mod-compat.md), those mods patch Minecraft's own Java classes through Mixins, and Horizon doesn't have those classes. The route Horizon takes is porting: mods' data and assets are imported automatically, and their code is ported to native Horizon mods (Rust → WASM) with a parity test against the original. That's described in docs/modpacks.md. Closing as not planned.
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#153
No description provided.