8#ifndef WASMTIME_TYPES_VAL_H
9#define WASMTIME_TYPES_VAL_H
31#define WASMTIME_HEAPTYPE_KIND_EXTERN 0
33#define WASMTIME_HEAPTYPE_KIND_NOEXTERN 1
35#define WASMTIME_HEAPTYPE_KIND_FUNC 2
37#define WASMTIME_HEAPTYPE_KIND_CONCRETE_FUNC 3
39#define WASMTIME_HEAPTYPE_KIND_NOFUNC 4
41#define WASMTIME_HEAPTYPE_KIND_ANY 5
43#define WASMTIME_HEAPTYPE_KIND_NONE 6
45#define WASMTIME_HEAPTYPE_KIND_EQ 7
47#define WASMTIME_HEAPTYPE_KIND_I31 8
49#define WASMTIME_HEAPTYPE_KIND_ARRAY 9
51#define WASMTIME_HEAPTYPE_KIND_CONCRETE_ARRAY 10
53#define WASMTIME_HEAPTYPE_KIND_STRUCT 11
55#define WASMTIME_HEAPTYPE_KIND_CONCRETE_STRUCT 12
57#define WASMTIME_HEAPTYPE_KIND_EXN 13
59#define WASMTIME_HEAPTYPE_KIND_CONCRETE_EXN 14
61#define WASMTIME_HEAPTYPE_KIND_NOEXN 15
114#define WASMTIME_VALTYPE_KIND_I32 0
116#define WASMTIME_VALTYPE_KIND_I64 1
118#define WASMTIME_VALTYPE_KIND_F32 2
120#define WASMTIME_VALTYPE_KIND_F64 3
122#define WASMTIME_VALTYPE_KIND_V128 4
124#define WASMTIME_VALTYPE_KIND_REF 5
Compilation environment and configuration.
An opaque object representing the type of a function.
An object representing the type of a value.
A WebAssembly heap type.
Definition: types/val.h:76
wasmtime_heaptype_union_t of
Payload of this heap type, with fields indicated by kind.
Definition: types/val.h:81
wasmtime_heaptype_kind_t kind
Discriminant of which heap type this is, and may indicate fields of of to use.
Definition: types/val.h:79
A WebAssembly reference type.
Definition: types/val.h:94
wasmtime_heaptype_t heaptype
The heap type of this reference type.
Definition: types/val.h:98
bool nullable
Whether this reference type is nullable.
Definition: types/val.h:96
A WebAssembly value type.
Definition: types/val.h:131
wasmtime_reftype_t reftype
Payload of this value type, only used with WASMTIME_VALTYPE_KIND_REF.
Definition: types/val.h:136
wasmtime_valtype_kind_t kind
Discriminant of which value type this is.
Definition: types/val.h:133
struct wasmtime_array_type wasmtime_array_type_t
An opaque handle to a WebAssembly array type definition.
Definition: types/arrayref.h:25
struct wasmtime_exn_type wasmtime_exn_type_t
A type of a WebAssembly exception.
Definition: types/exnref.h:16
struct wasmtime_struct_type wasmtime_struct_type_t
An opaque handle to a WebAssembly struct type definition.
Definition: types/structref.h:80
struct wasmtime_reftype wasmtime_reftype_t
A WebAssembly reference type.
WASM_API_EXTERN void wasmtime_heaptype_clone(const wasmtime_heaptype_t *ty, wasmtime_heaptype_t *out)
Clones ty into out.
WASM_API_EXTERN wasm_valtype_t * wasmtime_wasm_valtype_v128(void)
Returns a new value type representing the wasm v128 type.
WASM_API_EXTERN void wasmtime_heaptype_delete(wasmtime_heaptype_t *ty)
Deletes any payload of ty, if applicable.
WASM_API_EXTERN wasm_valtype_t * wasmtime_valtype_to_wasm(const wasm_engine_t *engine, const wasmtime_valtype_t *ty)
Converts ty into a wasm_valtype_t and returns a pointer to it.
WASM_API_EXTERN void wasmtime_reftype_delete(wasmtime_reftype_t *ty)
Deletes any payload of ty, if applicable.
WASM_API_EXTERN void wasmtime_valtype_new(const wasm_valtype_t *ty, wasmtime_valtype_t *out)
Creates a new type in out from the type in ty.
struct wasmtime_valtype wasmtime_valtype_t
A WebAssembly value type.
WASM_API_EXTERN void wasmtime_valtype_clone(const wasmtime_valtype_t *ty, wasmtime_valtype_t *out)
Clones ty into out.
WASM_API_EXTERN bool wasmtime_wasm_valtype_equal(const wasm_valtype_t *a, const wasm_valtype_t *b)
Returns whether a is logically equal to b.
uint8_t wasmtime_valtype_kind_t
Discriminant located in wasmtime_valtype_t.kind
Definition: types/val.h:111
WASM_API_EXTERN void wasmtime_valtype_delete(wasmtime_valtype_t *ty)
Deletes any payload of ty, if applicable.
WASM_API_EXTERN void wasmtime_reftype_clone(const wasmtime_reftype_t *ty, wasmtime_reftype_t *out)
Clones ty into out.
uint8_t wasmtime_heaptype_kind_t
Discriminant located in wasmtime_heaptype_t.kind
Definition: types/val.h:28
struct wasmtime_heaptype wasmtime_heaptype_t
A WebAssembly heap type.
union wasmtime_heaptype_union wasmtime_heaptype_union_t
Payload of the wasmtime_heaptype_t union.
Payload of the wasmtime_heaptype_t union.
Definition: types/val.h:64
wasmtime_exn_type_t * concrete_exn
Used with WASMTIME_HEAPTYPE_KIND_CONCRETE_EXN.
Definition: types/val.h:72
wasmtime_array_type_t * concrete_array
Used with WASMTIME_HEAPTYPE_KIND_CONCRETE_ARRAY.
Definition: types/val.h:68
wasm_functype_t * concrete_func
Used with WASMTIME_HEAPTYPE_KIND_CONCRETE_FUNC.
Definition: types/val.h:66
wasmtime_struct_type_t * concrete_struct
Used with WASMTIME_HEAPTYPE_KIND_CONCRETE_STRUCT.
Definition: types/val.h:70