Wasmtime
|
Representation of a WebAssembly value. More...
#include <doc-wasm.h>
Data Fields | |
wasm_valkind_t | kind |
The kind of this value, or which of the fields in the of payload contains the actual value. | |
union { | |
int32_t i32 | |
value for the WASM_I32 type | |
int64_t i64 | |
value for the WASM_I64 type | |
float32_t f32 | |
value for the WASM_F32 type | |
float64_t f64 | |
value for the WASM_F64 type | |
struct wasm_ref_t * ref | |
Unused by Wasmtime. | |
} | of |
The actual value of this wasm_val_t. Only one field of this anonymous union is valid, and which field is valid is defined by the kind field. | |
Representation of a WebAssembly value.
Note that this structure is intended to represent the way to communicate values from the embedder to the engine. This type is not actually the internal representation in JIT code, for example.
Also note that this is an owned value, notably the ref
field. The wasm_val_delete function does not delete the memory holding the wasm_val_t itself, but only the memory pointed to by wasm_val_t.