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
36WASM_API_EXTERN wasmtime_error_t *
38 const wasmtime_val_t *val, wasmtime_global_t *ret);
39
45WASM_API_EXTERN wasm_globaltype_t *
47 const wasmtime_global_t *global);
48
59WASM_API_EXTERN void wasmtime_global_get(wasmtime_context_t *store,
60 const wasmtime_global_t *global,
61 wasmtime_val_t *out);
62
76WASM_API_EXTERN wasmtime_error_t *
78 const wasmtime_val_t *val);
79
80#ifdef __cplusplus
81} // extern "C"
82#endif
83
84#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:71
Container for different kinds of wasm values.
Definition: val.h:441