Skip to main content

cai_plugin_create

Function cai_plugin_create 

Source
#[unsafe(no_mangle)]
pub extern "C" fn cai_plugin_create() -> *mut CaiPlugin
Expand description

Create a new CAI plugin instance

Returns a pointer to a heap-allocated CaiPlugin that must be freed using cai_plugin_destroy to avoid memory leaks.

ยงSafety

  • The returned pointer must be freed with cai_plugin_destroy
  • The pointer is valid until cai_plugin_destroy is called