Move the WASM plugin host to the wasmtime 36 LTS#275
Merged
Conversation
wasmtime was pinned to 27.0.0, a line that never received security backports: fixes land on the 24.x and 36.x LTS branches and on current. Twelve upstream advisories formally cover 27.x as a result. None were reachable here -- the engine is Cranelift-only, builds without the WASI, component-model and threads features, sets wasm_simd(false), and uses the default allocator -- but the next one would not be fixed there either. 36.0.12 is the current LTS tip and is advisory-clean (24.x still carries six). Its MSRV of 1.86 sits under the crate's 1.87. The embedding API this uses is unchanged across the jump: Engine/Store/Linker/Module, func_wrap, get_typed_func, Memory read/write/grow/size, set_fuel and the determinism Config knobs all compile untouched, so wasmboard.rs needs no changes. The pin stays exact, because the reason for it is unchanged: a board snapshot stores a linear-memory image replayed against a module recompiled at load time, so the serialized shape does not change but the codegen behind it does. An existing state would deserialize happily and then run against a different compiler, so STATE_VERSION goes to 40 and the state is refused instead. This is the release to do it in -- 0.13 already breaks save states against 0.12 (27 -> 39), so the bump costs nothing extra. The comment on the pin now records the LTS policy so the next update tracks a supported line rather than whatever is newest. Net dependency change is five crates; cargo-sources.json regenerated for the Flatpak build. The advisory sweep over the lock drops from 34 matches to 2, both unmaintained notices with no patched version to move to (bincode 1.3.3, ttf-parser 0.25.1).
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Copperline’s optional WASM plugin host dependency (wasmtime) from the unsupported 27.x line to the 36.x LTS line, and bumps the emulator save-state format version to prevent older states from being resumed under different WASM codegen behavior.
Changes:
- Pin
wasmtimefrom=27.0.0to=36.0.12(LTS) while keeping the existing lean feature set (cranelift,runtime, no default features). - Bump
savestate::STATE_VERSIONfrom 39 → 40 to force rejection of older states that could otherwise deserialize and then diverge at runtime due to recompilation under a different wasmtime. - Regenerate
Cargo.lockand Flatpakcargo-sources.jsonto reflect the updated dependency graph.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/savestate.rs | Bumps STATE_VERSION to 40 and documents the rationale tied to the wasmtime upgrade. |
| Cargo.toml | Updates the exact wasmtime pin to =36.0.12 and records the LTS/backport and save-state implications. |
| Cargo.lock | Updates the resolved dependency tree for the wasmtime 36.x LTS line. |
| packaging/flatpak/cargo-sources.json | Regenerates vendoring sources to match the updated lockfile for Flatpak builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #274 (base is that branch, so this diff stays to the wasmtime move;
GitHub retargets to
mainonce #274 merges).Why now
wasmtime was pinned to 27.0.0, a line that never received security backports --
fixes land on the 24.x and 36.x LTS branches and on current. Twelve upstream
advisories formally cover 27.x as a result.
None were reachable in this configuration (Cranelift-only, no WASI, no component
model, no threads,
wasm_simd(false), default allocator), which is why #274 leftit alone. But the next advisory would not be fixed there either, and the only
thing that made the pin awkward to move -- save-state determinism -- is already
moot this cycle, since 0.13 breaks states against 0.12 regardless.
What moved
=27.0.0->=36.0.12, the current LTS tip:jump --
Engine/Store/Linker/Module,func_wrap,get_typed_func,Memoryread/write/grow/size,set_fuel, and the determinismConfigknobsall compile untouched, so
wasmboard.rsis not modified.pastedrops out entirely.The pin stays exact and its comment now records the LTS policy, so the next
update tracks a supported line rather than whatever is newest.
STATE_VERSION 39 -> 40
A board snapshot stores a linear-memory image replayed against a module
recompiled at load time. The serialized shape therefore does not change, so
an existing state would deserialize happily and then run against different
codegen -- a silent divergence rather than a clean refusal. The version bump
makes it refuse. Costs nothing extra: 0.13 already breaks states against 0.12
(27 -> 39).
Verification
Release build,
fmt,clippy --all-targets --all-features --locked -D warningsall clean. Unit suite 1839 passing, including all 9
wasmboardtests --save_state_round_trip_is_byte_identical,memory_grow_round_trips_through_a_snapshot,reset_clears_plugin_memoryandrunaway_plugin_loop_traps_on_fuel_instead_of_hangingamong them. 22 golden renders passing. Full
--ignoredsuite passing(
image_regression8/8,mb_ram3/3,vamiga_ts1/1). Headless boot smoke fine.cargo-sources.jsonregenerated. No docs pin a wasmtime version, so none neededupdating.
The advisory sweep over the whole lock drops from 34 matches to 2, both
unmaintained notices with no patched version available (
bincode1.3.3, which isthe save-state encoding, and
ttf-parser0.25.1 on the Linux font path).