Wasmtime
tag.h
Go to the documentation of this file.
1
10#ifndef WASMTIME_TAG_H
11#define WASMTIME_TAG_H
12
13#include <wasm.h>
14#include <wasmtime/error.h>
15#include <wasmtime/store.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
28typedef struct wasmtime_tag {
29 struct {
31 uint64_t store_id;
33 uint32_t __private1;
34 };
36 uint32_t __private2;
38
41#define WASMTIME_EXTERN_TAG 5
42
53 const wasm_tagtype_t *tt,
54 wasmtime_tag_t *ret);
55
61WASM_API_EXTERN wasm_tagtype_t *
63
67WASM_API_EXTERN bool wasmtime_tag_eq(const wasmtime_context_t *store,
68 const wasmtime_tag_t *a,
69 const wasmtime_tag_t *b);
70
71#ifdef __cplusplus
72} // extern "C"
73#endif
74
75#endif // WASMTIME_TAG_H
Definition and accessors of wasmtime_error_t.
An opaque object representing the type of a tag.
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
Errors generated by Wasmtime.
Representation of a tag in Wasmtime.
Definition: tag.h:28
uint32_t __private2
Private field for Wasmtime.
Definition: tag.h:36
uint32_t __private1
Private field for Wasmtime.
Definition: tag.h:33
uint64_t store_id
Internal identifier of what store this belongs to, never zero.
Definition: tag.h:31
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.
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.
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).
struct wasmtime_tag wasmtime_tag_t
Representation of a tag in Wasmtime.