pub unsafe fn dynamically_load_plugin(path: &str) -> (Library, Box<dyn Plugin>) {
    let lib = Library::new(path).unwrap();
    let func: Symbol<CreatePlugin> = lib.get(b"_bevy_create_plugin").unwrap();
    let plugin = Box::from_raw(func());
    (lib, plugin)
}
/// Dynamically links a plugin a 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 links a plugin a the given path. The plugin must export a function with the
[`CreatePlugin`] signature named `_bevy_create_plugin`.
Dynamically links a plugin a the given path . The plugin must export a function with the [ ` CreatePlugin ` ] signature named ` _bevy_create_plugin ` .
pub unsafe fn dynamically_load_plugin(path: &str) -> (Library, Box<dyn Plugin>) {
    let lib = Library::new(path).unwrap();
    let func: Symbol<CreatePlugin> = lib.get(b"_bevy_create_plugin").unwrap();
    let plugin = Box::from_raw(func());
    (lib, plugin)
}
pub unsafe fn dynamically_load_plugin ( path : & str ) -> ( Library , Box < dyn Plugin > ) { let lib = Library :: new ( path ) . unwrap ( ) ; let func : Symbol < CreatePlugin > = lib . get ( b" " ) . unwrap ( ) ; let plugin = Box :: from_raw ( func ( ) ) ; ( lib , plugin ) }
Dynamically links a plugin a the given path.
Dynamically links a plugin a the given path .
path
&str
path
&str
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`].
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 ` ] .