Function wasmedge_sys::ffi::WasmEdge_ModuleInstanceCreateWASI
source · pub unsafe extern "C" fn WasmEdge_ModuleInstanceCreateWASI(
Args: *const *const c_char,
ArgLen: u32,
Envs: *const *const c_char,
EnvLen: u32,
Preopens: *const *const c_char,
PreopenLen: u32
) -> *mut WasmEdge_ModuleInstanceContext
Expand description
Creation of the WasmEdge_ModuleInstanceContext for the WASI specification.
This function will create a WASI host module that contains the WASI host
functions and initialize it. The caller owns the object and should call
WasmEdge_ModuleInstanceDelete
to destroy it.
\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.
\returns pointer to context, NULL if failed.