CmdletRunFn

Type Alias CmdletRunFn 

Source
pub type CmdletRunFn = fn(arg_str_ptr: u32, arg_str_size: u32) -> u32;
Expand description

ark_cmdlet_run - Run cmdlet

The parameter is an argument string (UTF-8) that is stored in the Wasm module’s memory.

§Returns

A return value of 0 means the cmdlet completed successful, non-zero means failure. On failure the function may return a UTF-8 string error message with a the Ark return slice mechanism.

§Example

#[no_mangle]
fn ark_cmdlet_run(arg_str_ptr: *const u8, arg_str_size: u32) -> u32 {
    0
}