Wasmtime
table.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_TABLE_H
8#define WASMTIME_TABLE_H
9
10#include <wasm.h>
11#include <wasmtime/extern.h>
12#include <wasmtime/store.h>
13#include <wasmtime/error.h>
14#include <wasmtime/val.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
33 wasmtime_context_t *store,
34 const wasm_tabletype_t *ty,
35 const wasmtime_val_t *init,
36 wasmtime_table_t *table
37);
38
45 const wasmtime_context_t *store,
46 const wasmtime_table_t *table
47);
48
61WASM_API_EXTERN bool wasmtime_table_get(
62 wasmtime_context_t *store,
63 const wasmtime_table_t *table,
64 uint32_t index,
66);
67
82 wasmtime_context_t *store,
83 const wasmtime_table_t *table,
84 uint32_t index,
85 const wasmtime_val_t *value
86);
87
91WASM_API_EXTERN uint32_t wasmtime_table_size(
92 const wasmtime_context_t *store,
93 const wasmtime_table_t *table
94);
95
114 wasmtime_context_t *store,
115 const wasmtime_table_t *table,
116 uint32_t delta,
117 const wasmtime_val_t *init,
118 uint32_t *prev_size
119);
120
121#ifdef __cplusplus
122} // extern "C"
123#endif
124
125#endif // WASMTIME_TABLE_H
126
Definition and accessors of wasmtime_error_t.
Definition of wasmtime_extern_t and external items.
An opaque object representing the type of a table.
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
Errors generated by Wasmtime.
Representation of a table in Wasmtime.
Definition: extern.h:38
Container for different kinds of wasm values.
Definition: val.h:207
uint32_t wasmtime_table_size(const wasmtime_context_t *store, const wasmtime_table_t *table)
Returns the size, in elements, of the specified table.
wasm_tabletype_t * wasmtime_table_type(const wasmtime_context_t *store, const wasmtime_table_t *table)
Returns the type of this table.
wasmtime_error_t * wasmtime_table_new(wasmtime_context_t *store, const wasm_tabletype_t *ty, const wasmtime_val_t *init, wasmtime_table_t *table)
Creates a new host-defined wasm table.
wasmtime_error_t * wasmtime_table_grow(wasmtime_context_t *store, const wasmtime_table_t *table, uint32_t delta, const wasmtime_val_t *init, uint32_t *prev_size)
Grows a table.
wasmtime_error_t * wasmtime_table_set(wasmtime_context_t *store, const wasmtime_table_t *table, uint32_t index, const wasmtime_val_t *value)
Sets a value in a table.
bool wasmtime_table_get(wasmtime_context_t *store, const wasmtime_table_t *table, uint32_t index, wasmtime_val_t *val)
Gets a value in a table.