logo
pub type ModuleRunFn = fn(*const u8, u32) -> ErrorCode;
Expand description

Module Run dynamic entrypoint

This is the signature for functions that can be launched by the Module Run API. They can use any name, as the function name is part of the Module Run launch API.

The input parameter is a byte vector.

If the function is successful then it will return a memory buffer through the Ark return slice mechanism, and return ErrorCode::Success.

Example

#[no_mangle]
pub unsafe fn ark_transform(input_ptr: *const u8, input_len: u32) -> ark_api_ffi::ErrorCode {
    ark_api_ffi::ErrorCode::Success
}