cli: fix wasm hot-patch fat builds with wasm-bindgen 0.2.128 / Rust beta (Playwright CI) - #5843
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'DevinAI' or '@devin'.
|
staging-devin-ai-integration
Bot
force-pushed
the
devin/1789557408-fix-hotpatch-playwright-beta
branch
2 times, most recently
from
September 16, 2026 12:32
e9b2eac to
947f20e
Compare
LucaCappelletti94
left a comment
There was a problem hiding this comment.
I would request changes, but I can only comment.
Rust beta emits Wasm exception-handling constructs (`tag` imports) in the fullstack client build. walrus 0.23 fails to parse these ("exceptions proposal not enabled"), breaking every fat/hot-patch web build and wasm-split processing on beta.
Upgrade walrus to 0.26.5 and wasmparser to 0.245.1, raise the `id-arena` and `rayon` workspace minimums to what walrus 0.26 requires (keeps the minimum-dependency-versions check happy), and adapt to the small API changes in `assets.rs`, `wasm-split-cli`, and `wasm-used`.
wasm-bindgen >= 0.2.128 discovers generic-import descriptors by scanning every local function for a direct call to the `__wbindgen_describe_generic_import` import and interpreting that function as a descriptor. Its shims reach the import through the `#[inline(always)] describe_generic_import` wrapper, which is assumed to never survive as a real wasm function. `-Clink-dead-code` makes rustc emit `#[inline]` functions as a single shared instantiation per crate instead of a local copy per CGU, so at opt-level=0 the wrapper can't be inlined across CGUs and survives out-of-line. wasm-bindgen then interprets it with no payload and panics with `index out of bounds` in `decode_generic_import`. This reproduces on stable as well as beta. On wasm we don't need the flag: retention comes from `--no-gc-sections` and `--whole-archive`, and `prepare_wasm_base_module` promotes the symbol table into the indirect function table itself. Native targets keep `-Clink-dead-code`, since patches resolve against the base binary's exported symbols.
staging-devin-ai-integration
Bot
force-pushed
the
devin/1789557408-fix-hotpatch-playwright-beta
branch
from
October 3, 2026 21:24
947f20e to
f9f719d
Compare
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.
Summary
The
web-hot-patch/web-hot-patch-fullstackPlaywright fixtures fail to build in CI. Two independent causes, one commit each.cli: drop -Clink-dead-code for wasm hot-patch buildswasm-bindgen ≥ 0.2.128 discovers generic-import /
wbg_castdescriptors by scanning every local function for a direct call to the__wbindgen_describe_generic_importimport and interpreting that function as a descriptor. Its shims reach the import through the#[inline(always)] wasm_bindgen::describe::describe_generic_importwrapper, which is assumed to never exist as a real wasm function.The fat build passes
-Clink-dead-codeto the final crate. Besides its linker effect, that flag makes rustc emit#[inline]functions as one shared instantiation per crate instead of a local copy per CGU, so atopt-level=0calls from other CGUs can't be inlined. The wrapper survives out-of-line, wasm-bindgen "interprets" it with no payload →index out of boundspanic indecode_generic_import. Reproduces on stable as well as beta (the stable Playwright job was skipped on #5842, which made it look beta-only).On wasm the flag isn't needed for retention: that comes from
--no-gc-sections+--whole-archive, andprepare_wasm_base_modulepromotes the symbol table to the indirect function table itself. Native targets keep it — patches resolve against the base binary's exported symbols, and dropping it there breaks the fullstack server patch withdlopen: undefined symbol ….Bump walrus 0.23 -> 0.26 and wasmparser 0.235 -> 0.245Rust beta emits Wasm exception-handling constructs (
tagimports) in the fullstack client build; walrus 0.23 fails withexceptions proposal not enabled. Bumpswalrus→ 0.26.5 andwasmparser→ 0.245.1 (with matchingid-arena/rayonminimums for the min-versions check) and adapts the small API changes inassets.rs,wasm-split-cli,wasm-used.Verification
RUSTUP_TOOLCHAIN={beta,stable} npx playwright test web-patch.spec.js web-patch-fullstack.spec.js→ 2 passed on both toolchains; patch jump-table sizes identical to before.cargo +1.94.0 clippy -p dioxus-cli -D warningsclean.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/772e28e3f6d84ac1925da7ddfc952d2d
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/772e28e3f6d84ac1925da7ddfc952d2d?variant=devin-insiders
Requested by: @nicoburns