OS: Ubuntu 18.04
Doesn't seem to happen on Windows, untested on MacOS.
I created cr-sys crate to wrap cr.h: A Simple C Hot Reload Header-only Library.
It works, except that each version of the plugin isn't unloaded correctly, if the plugin uses TLS destructors registered with __cxa_thread_atexit_impl.
C++ plugins can be compiled with -fno-use-cxa-atexit to disable the use of __cxa_thread_atexit. But I can't find away to do this with Rust plugins.
Right now the only work around is to not unload old plugin and make sure to use a different name for each plugin version.
Is there any way to run the TLS destructors registered by the plugin or to disable TLS destructors for a Rust shared library?
Related issue on cr.h:
fungos/cr#35
OS: Ubuntu 18.04
Doesn't seem to happen on Windows, untested on MacOS.
I created
cr-syscrate to wrap cr.h: A Simple C Hot Reload Header-only Library.It works, except that each version of the plugin isn't unloaded correctly, if the plugin uses TLS destructors registered with
__cxa_thread_atexit_impl.C++ plugins can be compiled with
-fno-use-cxa-atexitto disable the use of__cxa_thread_atexit. But I can't find away to do this with Rust plugins.Right now the only work around is to not unload old plugin and make sure to use a different name for each plugin version.
Is there any way to run the TLS destructors registered by the plugin or to disable TLS destructors for a Rust shared library?
Related issue on
cr.h:fungos/cr#35