wasmtime_module_new function
- @Native<Pointer<
wasmtime_error_t> Function(Pointer<wasm_engine_t> , Pointer<Uint8> , Size, Pointer<Pointer< )>(ffi.Pointer<wasm_engine_t>, ffi.Pointer<ffi.Uint8>, ffi.Size, ffi.Pointer<ffi.Pointer<wasmtime_module_t>>)>()wasmtime_module_t> >
- Pointer<
wasm_engine_t> engine, - Pointer<
Uint8> wasm, - int wasm_len,
- Pointer<
Pointer< ret,wasmtime_module_t> >
\brief Compiles a WebAssembly binary into a #wasmtime_module_t
This function will compile a WebAssembly binary into an owned #wasm_module_t. This performs the same as #wasm_module_new except that it returns a #wasmtime_error_t type to get richer error information.
On success the returned #wasmtime_error_t is NULL and the ret pointer is
filled in with a #wasm_module_t. On failure the #wasmtime_error_t is
non-NULL and the ret pointer is unmodified.
This function does not take ownership of any of its arguments, but the returned error and module are owned by the caller.
Implementation
@ffi.Native<
ffi.Pointer<wasmtime_error_t> Function(
ffi.Pointer<wasm_engine_t>,
ffi.Pointer<ffi.Uint8>,
ffi.Size,
ffi.Pointer<ffi.Pointer<wasmtime_module_t>>,
)
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_module_new(
ffi.Pointer<wasm_engine_t> engine,
ffi.Pointer<ffi.Uint8> wasm,
int wasm_len,
ffi.Pointer<ffi.Pointer<wasmtime_module_t>> ret,
);