DioxusLabs / DioxusLabs/dioxus

dx bundle fails in wasm-bindgen ("doesn't have an adapter listed") on rust nightly-2026-08-06 and later (LLVM 23)

Open
#5,766 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

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):

```rust
// 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}" } }
}
```

```toml
# 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the minimal src/main.rs and Cargo.toml reproduction, then run dx bundle --profile wasm-release on the listed good and bad Rust nightlies. Compare Dioxus CLI's generated wasm with the plain cargo build and run both through the stock wasm-bindgen CLI, using wasm-bindgen/wasm-bindgen#5268 for context. Done means the affected dx bundle completes successfully without the adapter error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.