pub unsafe fn dynamically_load_plugin<P: AsRef<OsStr>>(
path: P,
) -> Result<(Library, Box<dyn Plugin>), DynamicPluginLoadError>๐Deprecated since 0.14.0: The current dynamic plugin system is unsound and will be removed in 0.15.
Expand description
Dynamically links a plugin at the given path. The plugin must export a function with the
CreatePlugin signature named _bevy_create_plugin.
ยงSafety
The specified plugin must be linked against the exact same libbevy.so as this program.
In addition the _bevy_create_plugin symbol must not be manually created, but instead created
by deriving DynamicPlugin on a unit struct implementing Plugin.
Dynamically loading plugins is orchestrated through dynamic linking. When linking against
foreign code, initialization routines may be run (as well as termination routines when the
program exits). The caller of this function is responsible for ensuring these routines are
sound. For more information, please see the safety section of libloading::Library::new.