rksm / hot-lib-reloader-rs

Reload Rust code without app restarts. For faster feedback cycles.
MIT License
577 stars 21 forks source link

Add support for #[cfg_attr(feature="reload", no_mangle)] #36

Open PPakalns opened 2 months ago

PPakalns commented 2 months ago

Add support for #[cfg_attr(feature="reload", no_mangle)]

README contains example how to use feature flag on one side of API, it would be nice if feature could be used on the other side of the api too.

Additionaly, no_mangle_if_debug looks like it uses debug_assertions , but reading documentation it looks like it doesn't work in debug mode if optimizations are enabled.

So alternative method for controlling no_mangle attribute would be useful

rksm commented 2 months ago

I currently don't have time to work on this but happy to accept contributions.