wasmtime_module_serialize function

  1. @Native<Pointer<wasmtime_error_t> Function(Pointer<wasmtime_module_t> module, Pointer<wasm_byte_vec_t> ret)>(ffi.Pointer<wasmtime_module_t>, ffi.Pointer<wasm_byte_vec_t>)>()
Pointer<wasmtime_error_t> wasmtime_module_serialize(
  1. Pointer<wasmtime_module_t> module,
  2. Pointer<wasm_byte_vec_t> ret
)

\brief This function serializes compiled module artifacts as blob data.

\param module the module \param ret if the conversion is successful, this byte vector is filled in with the serialized compiled module.

\return a non-null error if parsing fails, or returns NULL. If parsing fails then ret isn't touched.

This function does not take ownership of module, and the caller is expected to deallocate the returned #wasmtime_error_t and #wasm_byte_vec_t.

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_error_t> Function(
    ffi.Pointer<wasmtime_module_t>,
    ffi.Pointer<wasm_byte_vec_t>,
  )
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_module_serialize(
  ffi.Pointer<wasmtime_module_t> module,
  ffi.Pointer<wasm_byte_vec_t> ret,
);