|
Wasmtime
|
Wasmtime APIs for interacting with WebAssembly tags. More...
Go to the source code of this file.
Data Structures | |
| struct | wasmtime_tag |
| Representation of a tag in Wasmtime. More... | |
Macros | |
| #define | WASMTIME_EXTERN_TAG 5 |
| Value of wasmtime_extern_kind_t meaning that wasmtime_extern_t is a tag. | |
Typedefs | |
| typedef struct wasmtime_tag | wasmtime_tag_t |
| Representation of a tag in Wasmtime. More... | |
Functions | |
| WASM_API_EXTERN wasmtime_error_t * | wasmtime_tag_new (wasmtime_context_t *store, const wasm_tagtype_t *tt, wasmtime_tag_t *ret) |
| Creates a new host-defined tag. More... | |
| WASM_API_EXTERN wasm_tagtype_t * | wasmtime_tag_type (const wasmtime_context_t *store, const wasmtime_tag_t *tag) |
| Returns the type of the given tag. More... | |
| WASM_API_EXTERN bool | wasmtime_tag_eq (const wasmtime_context_t *store, const wasmtime_tag_t *a, const wasmtime_tag_t *b) |
| Tests whether two tags are identical (same definition). | |
Wasmtime APIs for interacting with WebAssembly tags.
Tags are used to create and identify exception objects. A tag describes the signature (payload types) of exceptions created with it.
| typedef struct wasmtime_tag wasmtime_tag_t |
Representation of a tag in Wasmtime.
Tags in Wasmtime are represented as an index into a store and don't have any data or destructor associated with the wasmtime_tag_t value. Tags cannot interoperate between wasmtime_store_t instances and if the wrong tag is passed to the wrong store then it may trigger an assertion to abort the process.
| WASM_API_EXTERN wasmtime_error_t * wasmtime_tag_new | ( | wasmtime_context_t * | store, |
| const wasm_tagtype_t * | tt, | ||
| wasmtime_tag_t * | ret | ||
| ) |
Creates a new host-defined tag.
| store | the store in which to create the tag |
| tt | the tag type that describes the tag's exception payload |
| ret | on success, filled with the new tag |
| WASM_API_EXTERN wasm_tagtype_t * wasmtime_tag_type | ( | const wasmtime_context_t * | store, |
| const wasmtime_tag_t * | tag | ||
| ) |
Returns the type of the given tag.
The returned wasm_tagtype_t is owned by the caller.