Since rust nightly-2026-08-06, dx bundle on a minimal web app fails during the wasm-bindgen step with:
ERROR wasm-bindgen error: error: import of `__wbg_location_5d269cf0aa99107a` doesn't have an adapter listed
Reproduction (dioxus-cli 0.7.10, wasm-bindgen 0.2.127):
// src/main.rs
use dioxus::prelude::*;
fn main() { dioxus::launch(app); }
fn app() -> Element {
let href = web_sys::window().and_then(|w| w.location().href().ok()).unwrap_or_default();
rsx! { div { "href: {href}" } }
}
# Cargo.toml
[package]
name = "wbg-hello"
version = "0.1.0"
edition = "2021"
[dependencies]
dioxus = { version = "0.7.10", features = ["web", "router"] }
web-sys = { version = "0.3.104", features = ["Window", "Location"] }
[profile.wasm-release]
inherits = "release"
codegen-units = 1
lto = true
opt-level = "z"
panic = "abort"
strip = true
Run dx bundle --profile wasm-release:
- nightly-2026-08-05 and earlier: works
- nightly-2026-08-06 and later (checked up to nightly-2026-08-20): fails with the error above
The first bad nightly, nightly-2026-08-06, is exactly the LLVM 22.1.8 to 23.1.0 upgrade (rustc 1ed2df61a good, 7608eb7b0 bad), so this looks related to LLVM 23 codegen.
What makes me file it here as well as in wasm-bindgen: a plain cargo build --profile wasm-release --target wasm32-unknown-unknown of the same crate followed by the stock wasm-bindgen CLI works on all nightlies, including with the RUSTFLAGS and profile overrides dx applies as far as I could replicate them. Only the wasm coming out of dx's own build path triggers the error, and the stock wasm-bindgen CLI run manually on that file fails the same way. So the trigger is something in the module dx's build produces, but I can't tell whether that module is malformed or whether wasm-bindgen should be handling it. Cross-linked with wasm-bindgen/wasm-bindgen#5268 where this was originally reported.
Since rust nightly-2026-08-06,
dx bundleon a minimal web app fails during the wasm-bindgen step with:Reproduction (dioxus-cli 0.7.10, wasm-bindgen 0.2.127):
Run
dx bundle --profile wasm-release:The first bad nightly, nightly-2026-08-06, is exactly the LLVM 22.1.8 to 23.1.0 upgrade (rustc 1ed2df61a good, 7608eb7b0 bad), so this looks related to LLVM 23 codegen.
What makes me file it here as well as in wasm-bindgen: a plain
cargo build --profile wasm-release --target wasm32-unknown-unknownof the same crate followed by the stock wasm-bindgen CLI works on all nightlies, including with the RUSTFLAGS and profile overrides dx applies as far as I could replicate them. Only the wasm coming out of dx's own build path triggers the error, and the stock wasm-bindgen CLI run manually on that file fails the same way. So the trigger is something in the module dx's build produces, but I can't tell whether that module is malformed or whether wasm-bindgen should be handling it. Cross-linked with wasm-bindgen/wasm-bindgen#5268 where this was originally reported.