#![allow(improper_ctypes_definitions)] pub mod callback; pub mod future; pub mod handle; pub mod new_stack; pub mod state; pub mod vtable; #[macro_use] extern crate tracing; use std::{marker::PhantomData, mem::forget}; use callback::RuntimeState; use dlopen2::wrapper::WrapperApi; use giterated_abi::vtable::VTable; use handle::PluginInitializationState; use new_stack::{FFIPluginMeta, PluginState}; use vtable::{HostVTable, Initialization}; #[derive(WrapperApi)] pub struct GiteratedPluginApi { plugin_meta: unsafe extern "C" fn() -> FFIPluginMeta, load_host_vtable: unsafe extern "C" fn(vtable: &HostVTable), load_initialization_vtable: unsafe extern "C" fn(vtable: &'static VTable), initialize: unsafe extern "C" fn(runtime_state: *const RuntimeState) -> PluginState, initialize_registration: unsafe extern "C" fn( init_state: *mut PluginInitializationState, ) -> *mut PluginInitializationState, load_type_metadata: unsafe extern "C" fn(metadata: *mut ()), } pub mod plugin { pub use giterated_macros::plugin_init as init; } pub use giterated_macros::plugin;