Wasmtime
component/types/instance.h File Reference
#include <wasmtime/conf.h>
#include <wasm.h>

Go to the source code of this file.

Typedefs

typedef struct wasmtime_component_instance_type wasmtime_component_instance_type_t
 Represents the type of a component instance.
 

Functions

WASM_API_EXTERN wasmtime_component_instance_type_twasmtime_component_instance_type_clone (const wasmtime_component_instance_type_t *ty)
 Clones a component instance type. More...
 
WASM_API_EXTERN void wasmtime_component_instance_type_delete (wasmtime_component_instance_type_t *ty)
 Deallocates a component instance type.
 
WASM_API_EXTERN size_t wasmtime_component_instance_type_export_count (const wasmtime_component_instance_type_t *ty, const wasm_engine_t *engine)
 Returns the number of exports of a component instance type.
 
WASM_API_EXTERN bool wasmtime_component_instance_type_export_get (const wasmtime_component_instance_type_t *ty, const wasm_engine_t *engine, const char *name, size_t name_len, struct wasmtime_component_item_t *ret)
 Retrieves the export with the specified name. More...
 
WASM_API_EXTERN bool wasmtime_component_instance_type_export_nth (const wasmtime_component_instance_type_t *ty, const wasm_engine_t *engine, size_t nth, const char **name_ret, size_t *name_len_ret, struct wasmtime_component_item_t *type_ret)
 Retrieves the nth export. More...
 

Function Documentation

◆ wasmtime_component_instance_type_clone()

WASM_API_EXTERN wasmtime_component_instance_type_t * wasmtime_component_instance_type_clone ( const wasmtime_component_instance_type_t ty)

Clones a component instance type.

The pointer returned from this function must be deallocated with wasmtime_component_instance_type_delete.

◆ wasmtime_component_instance_type_export_get()

WASM_API_EXTERN bool wasmtime_component_instance_type_export_get ( const wasmtime_component_instance_type_t ty,
const wasm_engine_t engine,
const char *  name,
size_t  name_len,
struct wasmtime_component_item_t ret 
)

Retrieves the export with the specified name.

The returned wasmtime_component_item_t must be deallocated with wasmtime_component_item_delete.

◆ wasmtime_component_instance_type_export_nth()

WASM_API_EXTERN bool wasmtime_component_instance_type_export_nth ( const wasmtime_component_instance_type_t ty,
const wasm_engine_t engine,
size_t  nth,
const char **  name_ret,
size_t *  name_len_ret,
struct wasmtime_component_item_t type_ret 
)

Retrieves the nth export.

The returned wasmtime_component_item_t must be deallocated with wasmtime_component_item_delete.