#[invokable]
Expand description

Macro creating a wrapper around a function making it able to be exposed as internal call.

Restrictions

Arguments of function with invokable atribute must be of types that implement InteropRecive trait. Return type of the function must implement InvokeSend trait.

Example

#[invokable]
fn print_message(message:String){
    println!("{}",message);
}

Will create a wrapper and a function type needed to expose it it mono runtime

extern "C" fn print_message_invokable(message:*mut <String as InteropRecive>::SourceType){
    let message = <String>::get_rust_rep(message);
    let res = print_message(message);
}
pub type extern fn print_message_fn_type = extern "C" fn (<String as InteropRecive>::SourceType);