Wasmtime
wasmtime_externref Struct Reference

A host-defined un-forgeable reference to pass into WebAssembly. More...

#include <val.h>

Data Fields

uint64_t store_id
 
uint32_t __private1
 Internal to Wasmtime.
 
uint32_t __private2
 Internal to Wasmtime.
 

Detailed Description

A host-defined un-forgeable reference to pass into WebAssembly.

This structure represents an externref that can be passed to WebAssembly. It cannot be forged by WebAssembly itself and is guaranteed to have been created by the host.

This structure is similar to wasmtime_anyref_t but represents the externref type in WebAssembly. This can be created on the host from arbitrary host pointers/destructors. Note that this value is itself a reference into a wasmtime_context_t and must be explicitly unrooted to enable garbage collection.

Note that null is represented with this structure and created with wasmtime_externref_set_null. Null can be tested for with the wasmtime_externref_is_null function.

Field Documentation

◆ store_id

uint64_t wasmtime_externref::store_id

Internal metadata tracking within the store, embedders should not configure or modify these fields.


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