Repository navigation
Conversation
Adds AppScriptCallbackRunners::run_in_context, backed by a context runner each scripting plugin registers. The locking part of handle is extracted into run_in_script_context so both share the same re-entry handling.
Adds bevy_mod_scripting_reactive_ui: script described bevy_ui trees where components run once, bound properties and dynamic regions re-run when the signals they read change, and reloads keep component state.
- keep the interaction query between flushes, poll watched components once per flush (again only after handlers or effects ran), skip idle flushes - computeds only wake their readers when their value changed (push-pull) - ui.selector: selector:is(key) only re-runs the readers of the old and new key, so selecting in a list re-runs two items instead of all
ui.path, ui.format, ui.percent, ui.lt, ui.mul, ui.select and ui.is build UiValues: properties made of them know what they read up front and update without running script code or entering the script's context.
Elements cross to scripts as plain integers, so building and reading them needs no allocation for scripts, reflection or access claims. Handles are checked against the flush that built them.
Static properties, handlers and the components bound properties write are set up before spawning, so mounting an element places it in its archetype once instead of moving it per inserted component.
Changed Files
|
This was referenced Nov 13, 2026
component, element, render, show, when, selected, background_color, flex_direction. select and is are keywords in Rune.
…-perf # Conflicts: # crates/bevy_mod_scripting_reactive_ui/src/lib.rs
…-perf # Conflicts: # crates/bevy_mod_scripting_reactive_ui/src/element.rs # crates/bevy_mod_scripting_reactive_ui/src/lib.rs # crates/bevy_mod_scripting_reactive_ui/src/runtime.rs
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mount optimisations for the reactive UI, on top of #714:
Most of what is left is script side: props table conversion, component renders and the first run of bindings.