Expand description
Types and conventions for loading plugins from cdylib shared libraries.
Each plugin cdylib exports two symbols:
- [
DECLARATION_SYMBOL]: a static [PluginDeclaration] with metadata - [
CREATE_SYMBOL]: a [CreateFn] that constructs the plugin
The loader reads the declaration first to check API/protocol compatibility,
then calls the create function to obtain a Box<dyn Plugin>.
Structs§
- Plugin
Declaration - C-compatible plugin metadata exported as a
#[no_mangle]static from each cdylib plugin.
Constants§
- CREATE_
SYMBOL - Null-terminated symbol name for the
CreateFnfunction. - DECLARATION_
SYMBOL - Null-terminated symbol name for the
PluginDeclarationstatic. - DESTROY_
SYMBOL - Null-terminated symbol name for the
DestroyFnfunction.
Functions§
- config_
from_ ⚠raw - Helper to extract a
&strconfig from raw FFI pointers.