Wasmtime
component/types/instance.h
Go to the documentation of this file.
1
2
3#ifndef WASMTIME_COMPONENT_TYPES_INSTANCE_H
4#define WASMTIME_COMPONENT_TYPES_INSTANCE_H
5
6#include <wasmtime/conf.h>
7
8#ifdef WASMTIME_FEATURE_COMPONENT_MODEL
9
10#include <wasm.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
17
19typedef struct wasmtime_component_instance_type
21
26WASM_API_EXTERN
29
31WASM_API_EXTERN
34
36WASM_API_EXTERN
38 const wasmtime_component_instance_type_t *ty, const wasm_engine_t *engine);
39
44WASM_API_EXTERN
47 const char *name, size_t name_len, struct wasmtime_component_item_t *ret);
48
53WASM_API_EXTERN
56 size_t nth, const char **name_ret, size_t *name_len_ret,
57 struct wasmtime_component_item_t *type_ret);
58
59#ifdef __cplusplus
60} // extern "C"
61#endif
62
63#endif // WASMTIME_FEATURE_COMPONENT_MODEL
64
65#endif // WASMTIME_COMPONENT_TYPES_INSTANCE_H
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.
WASM_API_EXTERN void wasmtime_component_instance_type_delete(wasmtime_component_instance_type_t *ty)
Deallocates 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.
struct wasmtime_component_instance_type wasmtime_component_instance_type_t
Represents the type of a component instance.
Definition: component/types/instance.h:19
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.
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.
Build-time defines for how the C API was built.
Compilation environment and configuration.
Represents a single item in a component's import or export list.
Definition: component/types/component.h:137