ark_api_ffi/entrypoints/
module_run.rs

1//! Module Run capability module entrypoints
2
3/// Module Run dynamic entrypoint
4///
5/// This is the signature for functions that can be launched by the Module Run API.
6/// They can use any name, as the function name is part of the Module Run launch API.
7///
8/// The input parameter is a byte vector.
9///
10/// If the function is successful then it will return a memory buffer through the Ark return slice mechanism, and return `ErrorCode::Success`.
11///
12/// # Example
13///
14/// ```
15/// #[no_mangle]
16/// pub unsafe fn ark_transform(input_ptr: *const u8, input_len: u32) -> ark_api_ffi::ErrorCode {
17///     ark_api_ffi::ErrorCode::Success
18/// }
19/// ```
20pub type ModuleRunFn = fn(input_ptr: *const u8, input_len: u32) -> crate::ErrorCode;