Wasmtime
extern.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_EXTERN_H
8#define WASMTIME_EXTERN_H
9
10#include <wasmtime/module.h>
11#include <wasmtime/store.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
24typedef struct wasmtime_func {
26 uint64_t store_id;
28 size_t index;
30
38typedef struct wasmtime_table {
40 uint64_t store_id;
42 size_t index;
44
52typedef struct wasmtime_memory {
54 uint64_t store_id;
56 size_t index;
58
66typedef struct wasmtime_global {
68 uint64_t store_id;
70 size_t index;
72
74typedef uint8_t wasmtime_extern_kind_t;
75
78#define WASMTIME_EXTERN_FUNC 0
81#define WASMTIME_EXTERN_GLOBAL 1
84#define WASMTIME_EXTERN_TABLE 2
87#define WASMTIME_EXTERN_MEMORY 3
88
99typedef union wasmtime_extern_union {
109
123typedef struct wasmtime_extern {
129
132
139
140#ifdef __cplusplus
141} // extern "C"
142#endif
143
144#endif // WASMTIME_EXTERN_H
145
wasm_externtype_t * wasmtime_extern_type(wasmtime_context_t *context, wasmtime_extern_t *val)
Returns the type of the wasmtime_extern_t defined within the given store.
struct wasmtime_memory wasmtime_memory_t
Representation of a memory in Wasmtime.
struct wasmtime_extern wasmtime_extern_t
Convenience alias for wasmtime_extern_t.
void wasmtime_extern_delete(wasmtime_extern_t *val)
Deletes a wasmtime_extern_t.
union wasmtime_extern_union wasmtime_extern_union_t
Convenience alias for wasmtime_extern_union.
uint8_t wasmtime_extern_kind_t
Discriminant of wasmtime_extern_t.
Definition: extern.h:74
struct wasmtime_table wasmtime_table_t
Representation of a table in Wasmtime.
struct wasmtime_global wasmtime_global_t
Representation of a global in Wasmtime.
struct wasmtime_func wasmtime_func_t
Representation of a function in Wasmtime.
An opaque object representing the type of a external value. Can be seen as a superclass of wasm_funct...
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
Container for different kinds of extern items.
Definition: extern.h:123
wasmtime_extern_union_t of
Container for the extern item's value.
Definition: extern.h:127
wasmtime_extern_kind_t kind
Discriminant of which field of of is valid.
Definition: extern.h:125
Representation of a function in Wasmtime.
Definition: extern.h:24
size_t index
Internal index within the store.
Definition: extern.h:28
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:26
Representation of a global in Wasmtime.
Definition: extern.h:66
size_t index
Internal index within the store.
Definition: extern.h:70
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:68
Representation of a memory in Wasmtime.
Definition: extern.h:52
size_t index
Internal index within the store.
Definition: extern.h:56
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:54
Representation of a table in Wasmtime.
Definition: extern.h:38
size_t index
Internal index within the store.
Definition: extern.h:42
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:40
Container for different kinds of extern items.
Definition: extern.h:99
wasmtime_memory_t memory
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_MEMORY.
Definition: extern.h:107
wasmtime_func_t func
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_FUNC.
Definition: extern.h:101
wasmtime_global_t global
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_GLOBAL.
Definition: extern.h:103
wasmtime_table_t table
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_TABLE.
Definition: extern.h:105