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>
12#include <wasmtime/store.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
25typedef struct wasmtime_func {
31 uint64_t store_id;
33 size_t __private;
35
43typedef struct wasmtime_table {
45 uint64_t store_id;
47 size_t __private;
49
57typedef struct wasmtime_memory {
59 uint64_t store_id;
61 size_t __private;
63
71typedef struct wasmtime_global {
73 uint64_t store_id;
75 size_t __private;
77
79typedef uint8_t wasmtime_extern_kind_t;
80
83#define WASMTIME_EXTERN_FUNC 0
86#define WASMTIME_EXTERN_GLOBAL 1
89#define WASMTIME_EXTERN_TABLE 2
92#define WASMTIME_EXTERN_MEMORY 3
95#define WASMTIME_EXTERN_SHAREDMEMORY 4
96
117 struct wasmtime_sharedmemory *sharedmemory;
119
133typedef struct wasmtime_extern {
139
142
149 wasmtime_extern_t *val);
150
151#ifdef __cplusplus
152} // extern "C"
153#endif
154
155#endif // WASMTIME_EXTERN_H
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:79
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:133
wasmtime_extern_union_t of
Container for the extern item's value.
Definition: extern.h:137
wasmtime_extern_kind_t kind
Discriminant of which field of of is valid.
Definition: extern.h:135
Representation of a function in Wasmtime.
Definition: extern.h:25
size_t __private
Private field for Wasmtime, undefined if store_id is zero.
Definition: extern.h:33
uint64_t store_id
Definition: extern.h:31
Representation of a global in Wasmtime.
Definition: extern.h:71
size_t __private
Private field for Wasmtime.
Definition: extern.h:75
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:73
Representation of a memory in Wasmtime.
Definition: extern.h:57
size_t __private
Private field for Wasmtime.
Definition: extern.h:61
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:59
Representation of a table in Wasmtime.
Definition: extern.h:43
size_t __private
Private field for Wasmtime.
Definition: extern.h:47
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: extern.h:45
Container for different kinds of extern items.
Definition: extern.h:107
struct wasmtime_sharedmemory * sharedmemory
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_SHAREDMEMORY.
Definition: extern.h:117
wasmtime_memory_t memory
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_MEMORY.
Definition: extern.h:115
wasmtime_func_t func
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_FUNC.
Definition: extern.h:109
wasmtime_global_t global
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_GLOBAL.
Definition: extern.h:111
wasmtime_table_t table
Field used if wasmtime_extern_t::kind is WASMTIME_EXTERN_TABLE.
Definition: extern.h:113