dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

dioxus 0.7 | WASM Splitting

Open dxps opened this issue 1 month ago • 2 comments

Problem

Dear all,

I would like to understand how to use WASM Split feature and play with it to evaluate how to use it in a medium or large project. Currently, I haven't found any documentation or example.

Tried in this (tutorial based) project and the build crashes like this:

…/dioxus_07_hotdog ❯ dx serve --hotpatch --web --wasm-split
16:14:32 [dev] -----------------------------------------------------------------
                Serving your app: dioxus_07_hotdog! 🚀
                • Press `ctrl+c` to exit the server
                • Press `r` to rebuild the app
                • Press `p` to toggle automatic rebuilds
                • Press `v` to toggle verbose logging
                • Press `/` for more commands and shortcuts
                Learn more at https://dioxuslabs.com/learn/0.7/getting_started
               ----------------------------------------------------------------
16:14:35 [server] [500] /.well-known/appspecific/com.chrome.devtools.json
16:15:09 [dev] Thread tokio-runtime-worker panicked at packages/wasm-split/wasm-split-cli/src/lib.rs:1248:17:

               assertion failed: reloc_range.end <= range.end
16:15:09 [dev] Build failed: Build panicked! JoinError::Panic(Id(40), "assertion failed: reloc_range.end <= range.end", ...)
╭──────────────────────────────────────────────────────────────────────────────── /:more ╮
│  App:     ━━━━━━━━━━━━━━━━━━━━━━━━━━  ❌           Platform: Web + fullstack           │
│  Server:  ━━━━━━━━━━━━━━━━━━━━━━━━━━  ❌           App features: ["web"]               │
│  Status:  Failed                                   Serving at: http://127.0.0.1:8080   │
╰────────────────────────────────────────────────────────────────────────────────────────╯

Steps To Reproduce

Use dx serve --hotpatch --web --wasm-split.

Environment:

  • Dioxus version: v0.7.2
  • Rust version: 1.91.1
  • OS info: macOS 26.1
  • App platform: web

Thanks!

dxps avatar Dec 06 '25 14:12 dxps

And some other related issue is that if I add wasm-split feature to dioxus crate (in Cargo.toml file), while the standard (using dx serve --hotpatch --web) build succeeds, the app is unusable in the browser due to the following error:

Image

dxps avatar Dec 06 '25 14:12 dxps