DioxusLabs / DioxusLabs/dioxus
Hotpatching breaks in empty project after first build on Windows
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
On Windows, `dx serve --hot-patch` in an empty project (or a project that doesn't provide hotpatching) only works on the first build. After the first build, it consistently throws these errors:
```
00:38:53 [dev] Failed to generate fat binary: rust-lld: error: C:\Projects\Rust\repro\target\x86_64-pc-windows-msvc\desktop-dev\libdeps-5ac58618.a: unknown file type
00:38:53 [dev] Build completed successfully in 584ms, launching app! 💫
00:38:53 [dev] Failed to open app: %1 is not a valid Win32 application. (os error 193)
```
**Steps To Reproduce**
Steps to reproduce the behavior:
- new empty project:
```ps
cargo new repro ; cd repro
```
- run project with
```ps
dx serve --hot-patch
```
- ctrl+c to exit after the "Hello, world!" prints
- run the same command again and observe error
**Expected behavior**
It should keep working after the first build or throw a more appropriate error
**Environment:**
- Dioxus version: dioxus 0.7.0-rc.0 (a519fba)
- Rust version: rustc 1.90.0 (1159e78c4 2025-09-14)
- OS info: Windows 10
- App platform: desktop
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.