Skip to content
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

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

Open
PPakalns opened this issue Apr 27, 2024 · 1 comment · May be fixed by #41
Open

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

PPakalns opened this issue Apr 27, 2024 · 1 comment · May be fixed by #41

Comments

@PPakalns
Copy link

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
Copy link
Owner

rksm commented Apr 29, 2024

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

SArpnt added a commit to SArpnt/hot-lib-reloader-rs that referenced this issue Oct 27, 2024
fixes rksm#36

the predicate currently isn't checked, which may cause false positives,
but this is very unlikely to happen and this can be dealt with in the future.
the relevant documentation and example have been adjusted.

the documentation for #[no_mangle_if_debug] has been removed since it doesn't
work with optimizations or the feature flag anyways.
it should later be deprecated and phased out.
@SArpnt SArpnt linked a pull request Oct 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants