-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor hot reload to allow custom dynamic plugins besides dylib-based #683
base: master
Are you sure you want to change the base?
Conversation
I haven't tested it yet. Please confirm that approach is fine, then I'll test it. |
My only concern (that's code based assumption, not checked manually) is that if Plugin unloaded successfully, but failed to load, it stucks forever in this state. Though, it seems that's original behavior. My proposal is to clear "need to reload" flag before reloading, so next change will force reloading again, allowing to recover. (note that there is no code in this MR regarding this) |
Looks good, please test your changes thoroughly, these dynamic plugins sucked a lot of blood from me and I don't want to debug them yet again. |
What about to perform following renamings?
|
I'm ok with that, feel free to rename it if you think new names are better. |
During testing, it's occurred that hot reload was broken in e9ff227a (reproduced on macos Ventura 13.4.1 (22F82), rustc 1.81.0 (eeb90cda1 2024-09-04), by setting this version and fixed |
merge after #687, because contains commits from. |
tested on MacOS |
165c611
to
d58117d
Compare
8813a27
to
ff98839
Compare
Could you please fix CI errors? It seems that there's one warning treated like an error and it should be easy to fix. |
fyrox-impl/src/plugin/dylib.rs
Outdated
|
||
|
||
/// Implementation of DynamicPluginTrait that [re]loads Rust code from Rust dylib . | ||
pub struct DyLybDynamicPlugin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo DyLyb...
, should be DyLib...
AbstractDynamicPlugin
trait introduced as a contract between engine and dynamic plugins. All dylib-specific code is hidden insideDyLibPlugin
, the only built-in implementation of theAbstractDynamicPlugin
.