Skip to main content

InitFn

Type Alias InitFn 

Source
pub type InitFn = unsafe extern "C" fn(ctx: *const u8, ctx_len: usize, host: *const HostVtable, out: *mut Buf) -> i32;
Expand description

Bring a plugin up: hand it the init context and the host callbacks, and take back its manifest.

ctx is a bincode InitCx borrowed for the call. host points at a HostVtable that lives for the process. On OK, out holds a bincode Manifest; on ERR or PANICKED it holds a UTF-8 message.