Skip to main content

Module metadata

Module metadata 

Source
Expand description

Plugin metadata exposed via the optional cfmp_metadata symbol.

The wire shape mirrors confium_core::ffi::plugin::CFMPluginMetadata — a #[repr(C)] struct of *const c_char fields. Plugin authors use PluginMetadataBuilder to construct the value at static-storage time, and the export! macro generates the cfmp_metadata entry point that returns a pointer to it.

Field strings are owned by the plugin (stored as 'static so they outlive the loader’s borrow). The returned pointer is valid for the lifetime of the loaded plugin.

Structs§

PluginMetadata
#[repr(C)] metadata struct returned by cfmp_metadata. Layout matches confium_core::ffi::plugin::CFMPluginMetadata so the loader can reinterpret the pointer.
PluginMetadataBuilder
Builder for PluginMetadata. Each call leaks a CString so the returned pointer is 'static (the value lives for the lifetime of the plugin, matching the contract).