wasmtime_component_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_component_t>>)>()wasmtime_component_t> >
- Pointer<
wasm_engine_t> engine, - Pointer<
Uint8> buf, - int len,
- Pointer<
Pointer< component_out,wasmtime_component_t> >
\brief Compiles a WebAssembly binary into a #wasmtime_component_t
This function will compile a WebAssembly binary into an owned #wasmtime_component_t.
It requires a component binary, such as what is produced by Rust cargo component tooling.
This function does not take ownership of any of its arguments, but the returned error and component are owned by the caller.
\param engine the #wasm_engine_t that will create the component \param buf the address of the buffer containing the WebAssembly binary \param len the length of the buffer containing the WebAssembly binary \param component_out on success, contains the address of the created component
\return NULL on success, else a #wasmtime_error_t describing the error
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_component_t>>,
)
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_component_new(
ffi.Pointer<wasm_engine_t> engine,
ffi.Pointer<ffi.Uint8> buf,
int len,
ffi.Pointer<ffi.Pointer<wasmtime_component_t>> component_out,
);