Wasmtime
wasmtime_val_raw Union Reference

Container for possible wasm values. More...

#include <val.h>

Data Fields

int32_t i32
 
int64_t i64
 
float32_t f32
 
float64_t f64
 
wasmtime_v128 v128
 
uint32_t anyref
 
uint32_t externref
 
void * funcref
 

Detailed Description

Container for possible wasm values.

This type is used on conjunction with wasmtime_func_new_unchecked as well as wasmtime_func_call_unchecked. Instances of this type do not have type information associated with them, it's up to the embedder to figure out how to interpret the bits contained within, often using some other channel to determine the type.

Field Documentation

◆ anyref

uint32_t wasmtime_val_raw::anyref

Field for when this val is a WebAssembly anyref value.

If this is set to 0 then it's a null anyref, otherwise this must be passed to wasmtime_anyref_from_raw to determine the wasmtime_anyref_t.

Note that this field is always stored in a little-endian format.

◆ externref

uint32_t wasmtime_val_raw::externref

Field for when this val is a WebAssembly externref value.

If this is set to 0 then it's a null externref, otherwise this must be passed to wasmtime_externref_from_raw to determine the wasmtime_externref_t.

Note that this field is always stored in a little-endian format.

◆ f32

float32_t wasmtime_val_raw::f32

Field for when this val is a WebAssembly f32 value.

Note that this field is always stored in a little-endian format.

◆ f64

float64_t wasmtime_val_raw::f64

Field for when this val is a WebAssembly f64 value.

Note that this field is always stored in a little-endian format.

◆ funcref

void* wasmtime_val_raw::funcref

Field for when this val is a WebAssembly funcref value.

If this is set to 0 then it's a null funcref, otherwise this must be passed to wasmtime_func_from_raw to determine the wasmtime_func_t.

Note that this field is always stored in a little-endian format.

◆ i32

int32_t wasmtime_val_raw::i32

Field for when this val is a WebAssembly i32 value.

Note that this field is always stored in a little-endian format.

◆ i64

int64_t wasmtime_val_raw::i64

Field for when this val is a WebAssembly i64 value.

Note that this field is always stored in a little-endian format.

◆ v128

wasmtime_v128 wasmtime_val_raw::v128

Field for when this val is a WebAssembly v128 value.

Note that this field is always stored in a little-endian format.


The documentation for this union was generated from the following file: