142#define WASMTIME_STORAGE_KIND_I8 9
144#define WASMTIME_STORAGE_KIND_I16 10
WASM_API_EXTERN wasmtime_error_t * wasmtime_structref_set_field(wasmtime_context_t *context, const wasmtime_structref_t *structref, size_t index, const wasmtime_val_t *val)
Set a field of a struct.
WASM_API_EXTERN void wasmtime_struct_type_delete(wasmtime_struct_type_t *ty)
Delete a struct type.
struct wasmtime_field_type wasmtime_field_type_t
Convenience alias for wasmtime_field_type.
struct wasmtime_struct_type wasmtime_struct_type_t
An opaque handle to a WebAssembly struct type definition.
Definition: gc.h:171
WASM_API_EXTERN wasmtime_struct_type_t * wasmtime_struct_type_new(const wasm_engine_t *engine, const wasmtime_field_type_t *fields, size_t nfields)
Create a new struct type.
WASM_API_EXTERN void wasmtime_structref_clone(const wasmtime_structref_t *structref, wasmtime_structref_t *out)
Clone a structref, creating a new root.
WASM_API_EXTERN bool wasmtime_eqref_is_struct(wasmtime_context_t *context, const wasmtime_eqref_t *eqref)
Test whether an eqref is a structref.
WASM_API_EXTERN void wasmtime_structref_unroot(wasmtime_structref_t *ref)
Unroot a structref to allow garbage collection.
WASM_API_EXTERN void wasmtime_structref_to_eqref(const wasmtime_structref_t *structref, wasmtime_eqref_t *out)
Upcast a structref to an eqref.
WASM_API_EXTERN void wasmtime_eqref_to_anyref(const wasmtime_eqref_t *eqref, wasmtime_anyref_t *out)
Upcast an eqref to an anyref.
WASM_API_EXTERN void wasmtime_eqref_unroot(wasmtime_eqref_t *ref)
Unroot an eqref to allow garbage collection.
struct wasmtime_eqref wasmtime_eqref_t
Convenience alias for wasmtime_eqref.
struct wasmtime_struct_ref_pre wasmtime_struct_ref_pre_t
An opaque, pre-allocated, and registered struct layout for faster allocation.
Definition: gc.h:201
uint8_t wasmtime_storage_kind_t
Discriminant for storage types in struct/array field types.
Definition: gc.h:139
WASM_API_EXTERN bool wasmtime_eqref_as_struct(wasmtime_context_t *context, const wasmtime_eqref_t *eqref, wasmtime_structref_t *out)
Downcast an eqref to a structref.
WASM_API_EXTERN bool wasmtime_eqref_i31_get_u(wasmtime_context_t *context, const wasmtime_eqref_t *eqref, uint32_t *dst)
Get the eqref's underlying i31ref value, zero extended.
WASM_API_EXTERN void wasmtime_eqref_clone(const wasmtime_eqref_t *eqref, wasmtime_eqref_t *out)
Clone an eqref, creating a new root.
WASM_API_EXTERN wasmtime_error_t * wasmtime_structref_field(wasmtime_context_t *context, const wasmtime_structref_t *structref, size_t index, wasmtime_val_t *out)
Read a field from a struct.
WASM_API_EXTERN bool wasmtime_eqref_i31_get_s(wasmtime_context_t *context, const wasmtime_eqref_t *eqref, int32_t *dst)
Get the eqref's underlying i31ref value, sign extended.
WASM_API_EXTERN void wasmtime_struct_ref_pre_delete(wasmtime_struct_ref_pre_t *pre)
Delete a struct pre-allocator.
WASM_API_EXTERN wasmtime_error_t * wasmtime_structref_new(wasmtime_context_t *context, const wasmtime_struct_ref_pre_t *pre, const wasmtime_val_t *fields, size_t nfields, wasmtime_structref_t *out)
Allocate a new struct instance.
WASM_API_EXTERN void wasmtime_structref_to_anyref(const wasmtime_structref_t *structref, wasmtime_anyref_t *out)
Upcast a structref to an anyref.
WASM_API_EXTERN wasmtime_struct_ref_pre_t * wasmtime_struct_ref_pre_new(wasmtime_context_t *context, const wasmtime_struct_type_t *ty)
Create a new struct pre-allocator.
WASM_API_EXTERN bool wasmtime_eqref_is_i31(wasmtime_context_t *context, const wasmtime_eqref_t *eqref)
Test whether this eqref is an i31ref.
WASM_API_EXTERN void wasmtime_eqref_from_i31(wasmtime_context_t *context, uint32_t i31val, wasmtime_eqref_t *out)
Create a new i31ref value.
struct wasmtime_structref wasmtime_structref_t
Convenience alias for wasmtime_structref.
Compilation environment and configuration.
A WebAssembly value in the any hierarchy of GC types.
Definition: val.h:47
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
A WebAssembly eqref value.
Definition: gc.h:35
void * __private3
Internal to Wasmtime.
Definition: gc.h:44
uint32_t __private2
Internal to Wasmtime.
Definition: gc.h:42
uint64_t store_id
Definition: gc.h:38
uint32_t __private1
Internal to Wasmtime.
Definition: gc.h:40
Errors generated by Wasmtime.
Describes the type and mutability of a struct field or array element.
Definition: gc.h:153
wasmtime_storage_kind_t kind
Definition: gc.h:157
bool mutable_
Definition: gc.h:160
A WebAssembly structref value.
Definition: gc.h:233
uint32_t __private2
Internal to Wasmtime.
Definition: gc.h:239
void * __private3
Internal to Wasmtime.
Definition: gc.h:241
uint32_t __private1
Internal to Wasmtime.
Definition: gc.h:237
uint64_t store_id
Internal metadata.
Definition: gc.h:235
Container for different kinds of wasm values.
Definition: val.h:541