Skip to main content

RpiPluginRegister

Type Alias RpiPluginRegister 

Source
pub type RpiPluginRegister = extern "C" fn(api: *const PluginApiVt, abi_version: u32) -> i32;
Expand description

Plugin entrypoint signature. The host loads the cdylib, looks up rpi_plugin_register_v2, and calls it with the host PluginApiVt and the host’s current RPI_PLUGIN_ABI_VERSION.

Return 0 on successful registration; nonzero is a plugin-defined error code (the host logs it and skips the plugin). The plugin must compare abi_version before reading api; register_entrypoint implements this ordering and safely rejects old/new ABI mixtures. A plugin should copy any needed function pointers only inside the callback this helper invokes.