bevy/release-content/release-notes/hot_patching.md
François Mockers 7a7bff8c17
Hot patching systems with subsecond (#19309)
# Objective

- Enable hot patching systems with subsecond
- Fixes #19296 

## Solution

- First commit is the naive thin layer
- Second commit only check the jump table when the code is hot patched
instead of on every system execution
- Depends on https://github.com/DioxusLabs/dioxus/pull/4153 for a nicer
API, but could be done without
- Everything in second commit is feature gated, it has no impact when
the feature is not enabled

## Testing

- Check dependencies without the feature enabled: nothing dioxus in tree
- Run the new example: text and color can be changed

---------

Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2025-06-03 21:12:38 +00:00

944 B

title authors pull_requests
Hot Patching Systems in a Running App
@mockersf
19309

Bevy now supports hot patching systems through subsecond from the Dixous project.

Enabled with the feature hotpatching, every system can now be modified during execution, and the change directly visible in your game.

Run BEVY_ASSET_ROOT="." dx serve --hot-patch --example hotpatching_systems --features hotpatching to test it.

dx is the Dioxus CLI, to install it run cargo install dioxus-cli@0.7.0-alpha.1 TODO: use the fixed version that will match the version of subsecond dependency used in Bevy at release time

Known limitations:

  • Only works on the binary crate (todo: plan to support it in Dioxus)
  • Not supported in Wasm (todo: supported in Dioxus but not yet implemented in Bevy)
  • No system signature change support (todo: add that in Bevy)
  • May be sensitive to rust/linker configuration (todo: better support in Dioxus)