wasmtime_component_linker_instance_add_instance function

  1. @Native<Pointer<wasmtime_error_t> Function(Pointer<wasmtime_component_linker_instance_t>, Pointer<wasm_byte_t>, Size, Pointer<Pointer<wasmtime_component_linker_instance_t>>)>(ffi.Pointer<wasmtime_component_linker_instance_t>, ffi.Pointer<ffi.Char>, ffi.Size, ffi.Pointer<ffi.Pointer<wasmtime_component_linker_instance_t>>)>()
Pointer<wasmtime_error_t> wasmtime_component_linker_instance_add_instance(
  1. Pointer<wasmtime_component_linker_instance_t> linker_instance,
  2. Pointer<wasm_byte_t> name,
  3. int name_len,
  4. Pointer<Pointer<wasmtime_component_linker_instance_t>> linker_instance_out,
)

\brief Defines a nested instance within this instance.

This can be used to describe arbitrarily nested levels of instances within a linker to satisfy nested instance exports of components.

\warning This acquires exclusive access to the \p linker_instance. The \p linker_instance MUST not be accessed by anything until the returned #wasmtime_component_linker_instance_t in \p linker_instance_out is destroyed by #wasmtime_component_linker_instance_delete.

\param linker_instance the linker instance from which the new one is created \param name new instance name \param name_len length of \p name in bytes \param linker_instance_out on success, the new #wasmtime_component_linker_instance_t \return on success NULL, otherwise an error

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_error_t> Function(
    ffi.Pointer<wasmtime_component_linker_instance_t>,
    ffi.Pointer<ffi.Char>,
    ffi.Size,
    ffi.Pointer<ffi.Pointer<wasmtime_component_linker_instance_t>>,
  )
>()
external ffi.Pointer<wasmtime_error_t>
wasmtime_component_linker_instance_add_instance(
  ffi.Pointer<wasmtime_component_linker_instance_t> linker_instance,
  ffi.Pointer<ffi.Char> name,
  int name_len,
  ffi.Pointer<ffi.Pointer<wasmtime_component_linker_instance_t>>
  linker_instance_out,
);