#[repr(C)]pub struct PrismPluginHost {
pub abi_version: u64,
pub struct_size: u32,
pub reserved: u32,
pub log: Option<unsafe extern "C" fn(self_: *const Self, level: PrismLogLevel, message: *const c_char)>,
}Expand description
A structure describing the loading Prism library, passed to a plugin’s entry point.
Fields§
§abi_version: u64The plugin ABI generation this implementation provides, equal to the PRISM_PLUGIN_ABI_VERSION against which Prism was compiled. A plugin MAY compare this value against its own requirements and decline to supply backends if it requires a newer host.
struct_size: u32The size of this structure as Prism understands it. A plugin MUST consult at most this many bytes and MUST treat any member beyond it as absent.
reserved: u32Reserved for future use. Prism sets this member to zero, and a plugin MUST ignore it.
log: Option<unsafe extern "C" fn(self_: *const Self, level: PrismLogLevel, message: *const c_char)>A function through which the plugin MAY record diagnostics during the entry point call. Its first argument MUST be the host descriptor Prism supplied; the plugin does not supply a source, and Prism records the diagnostic under a source that names the library being loaded. This member is never NULL. A plugin SHOULD use it to state the reason for declining a host, and MUST NOT retain the pointer beyond the entry point call.