ark-api-ffi 0.16.0

Ark low-level Wasm FFI API
Documentation
//! 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;