DioxusLabs / DioxusLabs/dioxus

dioxus 0.7 | WASM Splitting

Open
#5,062 2 comments 0 reactions 0 assignees View on GitHub
bug cli
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**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](https://github.com/dxps/dioxus_playground/tree/main/dioxus_07_hotdog) ([tutorial](https://dioxuslabs.com/learn/0.7/tutorial/new_app) based) project and the build crashes like this:

```shell
โ€ฆ/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!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with `dx serve --hotpatch --web --wasm-split` using the reported Dioxus 0.7.2 web setup. Start at packages/wasm-split/wasm-split-cli/src/lib.rs:1248 and inspect the assertion involving reloc_range and range. Done means the command no longer panics and WASM splitting can build the example project.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.