Wasmtime
global.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_GLOBAL_H
8#define WASMTIME_GLOBAL_H
9
10#include <wasm.h>
11#include <wasmtime/extern.h>
12#include <wasmtime/store.h>
13#include <wasmtime/val.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
37 wasmtime_context_t *store,
38 const wasm_globaltype_t *type,
39 const wasmtime_val_t *val,
41);
42
49 const wasmtime_context_t *store,
50 const wasmtime_global_t *global
51);
52
63WASM_API_EXTERN void wasmtime_global_get(
64 wasmtime_context_t *store,
65 const wasmtime_global_t *global,
67);
68
82 wasmtime_context_t *store,
83 const wasmtime_global_t *global,
84 const wasmtime_val_t *val
85);
86
87#ifdef __cplusplus
88} // extern "C"
89#endif
90
91#endif // WASMTIME_GLOBAL_H
Definition of wasmtime_extern_t and external items.
wasmtime_error_t * wasmtime_global_new(wasmtime_context_t *store, const wasm_globaltype_t *type, const wasmtime_val_t *val, wasmtime_global_t *ret)
Creates a new global value.
wasmtime_error_t * wasmtime_global_set(wasmtime_context_t *store, const wasmtime_global_t *global, const wasmtime_val_t *val)
Sets a global to a new value.
wasm_globaltype_t * wasmtime_global_type(const wasmtime_context_t *store, const wasmtime_global_t *global)
Returns the wasm type of the specified global.
void wasmtime_global_get(wasmtime_context_t *store, const wasmtime_global_t *global, wasmtime_val_t *out)
Get the value of the specified global.
An opaque object representing the type of a global.
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
Errors generated by Wasmtime.
Representation of a global in Wasmtime.
Definition: extern.h:66
Container for different kinds of wasm values.
Definition: val.h:207