wasmtime 48 LTS: one wasm-tools version for the runtime, packing and the SDK

wasmtime 36 read WebAssembly with wasm-tools 0.236, wit-component (cargo
horizon-mod, the sandbox tests) used 0.239 and the SDK's wit-bindgen 0.247:
three copies of wasmparser, wasm-encoder, wit-parser and wasm-metadata.
wasmtime 48, the next long-term-support line (fixes until August 2028),
wit-component 0.254 and wit-bindgen 0.60 all use 0.254. No code change;
horizon-mods now needs Rust 1.95.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-23 15:25:10 +02:00
parent 2439475716
commit 3d4b63c19e
4 changed files with 241 additions and 320 deletions
Generated
+230 -311
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -7,7 +7,7 @@ rust-version = "1.85"
description = "Write Horizon mods in Rust: WebAssembly components for the horizon:mod world (docs/mods.md)"
[dependencies]
wit-bindgen = { version = "0.57.1", default-features = false, features = ["macros", "realloc"] }
wit-bindgen = { version = "0.60.0", default-features = false, features = ["macros", "realloc"] }
[lints]
workspace = true
+5 -5
View File
@@ -3,7 +3,7 @@ name = "horizon-mods"
version = "0.1.0"
edition.workspace = true
license.workspace = true
rust-version = "1.86"
rust-version = "1.95"
description = "Horizon's mod runtime: sandboxed WebAssembly components (docs/mods.md)"
[dependencies]
@@ -12,11 +12,11 @@ serde_json = "1"
toml = "1.1.6"
zip = { version = "2", default-features = false, features = ["deflate"] }
log = "0.4"
# The 36 LTS line: security fixes until August 2027, and it builds on the client's Rust.
wasmtime = { version = "36.0.18", default-features = false, features = ["runtime", "cranelift", "component-model", "std"], optional = true }
# The 48 LTS line: security fixes until August 2028, on the same wasm-tools (0.254) as wit-component and the SDK's wit-bindgen.
wasmtime = { version = "48.0.7", default-features = false, features = ["runtime", "cranelift", "component-model", "std"], optional = true }
# Turns a mod's core module into a component (cargo horizon-mod build, the tests).
wit-component = { version = "0.239", optional = true }
wit-parser = { version = "0.239", optional = true }
wit-component = { version = "0.254", optional = true }
wit-parser = { version = "0.254", optional = true }
[features]
default = ["runtime"]
+5 -3
View File
@@ -14,7 +14,7 @@ folder, loads no runtime and plays exactly like vanilla 26.3.
| The contract (WIT) | `crates/horizon-mod-sdk/wit/horizon.wit` | 0.1: log, game-read, chat, hud, storage; tick, frame, chat and command hooks |
| SDK for mod authors | `crates/horizon-mod-sdk` | 0.1 |
| Example mod | `crates/horizon-mod-sdk/examples/coords-hud` | coordinates, facing and time HUD, `/where`, `/coords` |
| Runtime | `crates/horizon-mods` | wasmtime 36 LTS, component model |
| Runtime | `crates/horizon-mods` | wasmtime 48 LTS, component model |
| Authoring tool | `crates/cargo-horizon-mod` | `cargo horizon-mod new / build / run` |
| In the game | `crates/horizon-client/src/game/mods.rs`, Options > Mods | client mods |
| Launcher mod browser (Modrinth, CurseForge with a key) | [mod-browser.md](mod-browser.md) | resource packs, shader packs, modpacks |
@@ -130,8 +130,10 @@ There is no file, socket, process or raw-input interface, on purpose.
| native `cdylib` plugins | none | no: per OS and arch, unstable Rust ABI | yes | none | unsafe for players |
| an embedded JVM | none per mod | yes | Java | 100+ MB, seconds of startup | see the research |
wasmtime 36 is a long-term-support line (security fixes until August 2027)
that builds on the client's Rust 1.90. Only its `runtime`, `cranelift`,
wasmtime 48 is a long-term-support line (security fixes until August 2028)
and needs Rust 1.95. It reads WebAssembly with the same wasm-tools release
(0.254) as the `wit-component` that packs mods and the SDK's `wit-bindgen`, so
the build carries one copy of them. Only its `runtime`, `cranelift`,
`component-model` and `std` features are on: no WASI, no async, no GC
proposal, no profiling. Its cranelift backend generates native code for x86-64
and ARM64 on Windows, macOS and Linux, which is why one `.hmod` serves them