Skip to content

Hot-reload support for Bevy ECS systems #15613

Closed
@kaphula

Description

@kaphula

What problem does this solve or what need does it fill?

Fast iteration speed is crucial for successful game development. With Rust, the compilation speed can be much worse compared to other programming languages which makes tasks like tweaking minor game details such as UI or AI behavior tedious. Having the ability to compile functions on the fly while the game is running, even if for the very specific portions of the project, helps.

What solution would you like?

An ability to mark certain Bevy ECS systems as hot-reloadable and have them recompile themselves during runtime when they are changed. Naturally you cannot change the systems' type definitions without recompiling the whole project. To my understanding, this also requires advanced project setup with multiple crates so that the systems can be placed on to a separate crate which will compiled to dynamic library during runtime. Therefore, this would probably be an advanced feature only for users of Bevy ECS crate and not whole Bevy.

What alternative(s) have you considered?

There is a crate called hot-lib-reloader-rs that demonstrates how Bevy systems can be hot-reloaded during runtime. This works only partially, there are issues when you try to hot-reload system that modify resources or use commands. I have created a repo/branch that demonstrates this issue, more details can be found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions