DioxusLabs / DioxusLabs/dioxus
Bevy's `dynamic_linking` feature causes hotpatching error on Windows
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
When trying to use hotpatching on a trivial Bevy project with the `dynamic_linking` feature enabled, I get this error (verbose logging):
```
01:24:35 [dev] Build completed successfully in 217087ms, launching app! 💫
01:24:35 [dev] Opening app with main exe: "C:\\Projects\\Rust\\repro\\target\\dx\\repro\\debug\\windows\\app\\repro.exe-37edb638"
01:24:35 [dev] Application [windows] exited with error: exit code: 0xc0000135
```
`0xc0000135` is [`STATUS_DLL_NOT_FOUND`](https://stackoverflow.com/questions/11432940/what-does-error-code-0xc0000135-or-1073741515-exit-code-mean-when-starting-a), which seems related to Bevy's `dynamic_linking` feature using a dylib.
**Steps To Reproduce**
Steps to reproduce the behavior:
- Create a trivial bevy project:
```ps
cargo new repro
cd repro
cargo add bevy@0.17.0-rc.2 -F dynamic_linking -F hotpatching
```
- Add `opt-level = 3` to dependencies ([required ](https://bevy.org/learn/quick-start/getting-started/setup/#dynamic-linking) for bevy's `dynamic_linking` on Windows)
```toml
[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
```
- Add a minimal Bevy app in main()
```rs
use bevy::prelude::*;
fn main() {
App::new().run();
}
```
- Run with `dx serve --hot-patch`
**Expected behavior**
No error should be produced. This is a pretty rough issue because removing dynamic linking means much slower recompile times which kinda defeats the purpose of subsecond.
**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.