[][src]Function wamr_sys::wasm_runtime_load

pub unsafe extern "C" fn wasm_runtime_load(
    buf: *const u8,
    size: u32,
    error_buf: *mut c_char,
    error_buf_size: u32
) -> wasm_module_t

Load a WASM module from a specified byte buffer. The byte buffer can be WASM binary data when interpreter or JIT is enabled, or AOT binary data when AOT is enabled. If it is AOT binary data, it must be 4-byte aligned.

@param buf the byte buffer which contains the WASM binary data @param size the size of the buffer @param error_buf output of the exception info @param error_buf_size the size of the exception string

@return return WASM module loaded, NULL if failed