alef 0.23.33

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
    /// Optional string destructor: called for strings returned by vtable callbacks.
    pub free_string: Option<unsafe extern "C" fn(*mut std::ffi::c_char)>,
    /// Optional destructor: called once with `user_data` when the bridge is dropped.
    pub free_user_data: Option<unsafe extern "C" fn(*mut std::ffi::c_void)>,
}

// SAFETY: all fields are function pointers and free_user_data, which are Send + Sync.
unsafe impl Send for {{ vtable_name }} {}
unsafe impl Sync for {{ vtable_name }} {}