Is [no_mangle] required for plugins?
Describe the bug
In the plugins the #[cfg(feature = "no_mangle")] before zenoh_plugin_trait::declare_plugin!(... is used to avoid export of unmangled get_plugin_loader_version, get_compatibility, and load_plugin functions when they are not needed, i.e. when plugin is linked as static. Though it seems that everything works without them.
https://github.com/eclipse-zenoh/zenoh-plugin-mqtt/pull/32#discussion_r1471001574
Need to understand is this no_mangle feature really necessary
To reproduce
System info
I had symbol clashes in the past when statically linking more plugins, to be checked if it is still the case.
I had symbol clashes in the past when statically linking more plugins, to be checked if it is still the case.
This is why the feature exists: when statically linking more than one plugin, the linker will fail because multiple definitions for the same symbols exist.
I had symbol clashes in the past when statically linking more plugins, to be checked if it is still the case.
This is why the feature exists: when statically linking more than one plugin, the linker will fail because multiple definitions for the same symbols exist.
And that's the question now: how to reproduce this name clash again to justify usage of "no_mangle" ?