1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! Module Run capability module entrypoints

/// 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
/// }
/// ```
pub type ModuleRunFn = fn(input_ptr: *const u8, input_len: u32) -> crate::ErrorCode;