wasmedge_sys::ffi

Function WasmEdge_ModuleInstanceInitWASI

Source
pub unsafe extern "C" fn WasmEdge_ModuleInstanceInitWASI(
    Cxt: *mut WasmEdge_ModuleInstanceContext,
    Args: *const *const c_char,
    ArgLen: u32,
    Envs: *const *const c_char,
    EnvLen: u32,
    Preopens: *const *const c_char,
    PreopenLen: u32,
)
Expand description

Initialize the WasmEdge_ModuleInstanceContext for the WASI specification.

This function will initialize the WASI host module with the parameters.

\param Cxt the WasmEdge_ModuleInstanceContext of WASI import object. \param Args the command line arguments. The first argument suggests being the program name. NULL if the length is 0. \param ArgLen the length of the command line arguments. \param Envs the environment variables in the format ENV=VALUE. NULL if the length is 0. \param EnvLen the length of the environment variables. \param Preopens the directory paths to preopen. String format in GUEST_PATH:HOST_PATH means the path mapping, or the same path will be mapped. NULL if the length is 0. \param PreopenLen the length of the directory paths to preopen.