Wasmtime
extern.h File Reference

Definition of wasmtime_extern_t and external items. More...

Go to the source code of this file.

Data Structures

struct  wasmtime_func
 Representation of a function in Wasmtime. More...
 
struct  wasmtime_table
 Representation of a table in Wasmtime. More...
 
struct  wasmtime_memory
 Representation of a memory in Wasmtime. More...
 
struct  wasmtime_global
 Representation of a global in Wasmtime. More...
 
union  wasmtime_extern_union
 Container for different kinds of extern items. More...
 
union  wasmtime_extern
 Container for different kinds of extern items. More...
 

Macros

#define WASMTIME_EXTERN_FUNC   0
 Value of wasmtime_extern_kind_t meaning that wasmtime_extern_t is a function.
 
#define WASMTIME_EXTERN_GLOBAL   1
 Value of wasmtime_extern_kind_t meaning that wasmtime_extern_t is a global.
 
#define WASMTIME_EXTERN_TABLE   2
 Value of wasmtime_extern_kind_t meaning that wasmtime_extern_t is a table.
 
#define WASMTIME_EXTERN_MEMORY   3
 Value of wasmtime_extern_kind_t meaning that wasmtime_extern_t is a memory.
 
#define WASMTIME_EXTERN_SHAREDMEMORY   4
 Value of wasmtime_extern_kind_t meaning that wasmtime_extern_t is a shared memory.
 

Typedefs

typedef struct wasmtime_func wasmtime_func_t
 Representation of a function in Wasmtime. More...
 
typedef struct wasmtime_table wasmtime_table_t
 Representation of a table in Wasmtime. More...
 
typedef struct wasmtime_memory wasmtime_memory_t
 Representation of a memory in Wasmtime. More...
 
typedef struct wasmtime_global wasmtime_global_t
 Representation of a global in Wasmtime. More...
 
typedef uint8_t wasmtime_extern_kind_t
 Discriminant of wasmtime_extern_t.
 
typedef union wasmtime_extern_union wasmtime_extern_union_t
 Convenience alias for wasmtime_extern_union.
 
typedef struct wasmtime_extern wasmtime_extern_t
 Convenience alias for wasmtime_extern_t.
 

Functions

void wasmtime_extern_delete (wasmtime_extern_t *val)
 Deletes a wasmtime_extern_t.
 
wasm_externtype_twasmtime_extern_type (wasmtime_context_t *context, wasmtime_extern_t *val)
 Returns the type of the wasmtime_extern_t defined within the given store. More...
 

Detailed Description

Definition of wasmtime_extern_t and external items.

Typedef Documentation

◆ wasmtime_func_t

Representation of a function in Wasmtime.

Functions in Wasmtime are represented as an index into a store and don't have any data or destructor associated with the wasmtime_func_t value. Functions cannot interoperate between wasmtime_store_t instances and if the wrong function is passed to the wrong store then it may trigger an assertion to abort the process.

◆ wasmtime_global_t

Representation of a global in Wasmtime.

Globals in Wasmtime are represented as an index into a store and don't have any data or destructor associated with the wasmtime_global_t value. Globals cannot interoperate between wasmtime_store_t instances and if the wrong global is passed to the wrong store then it may trigger an assertion to abort the process.

◆ wasmtime_memory_t

Representation of a memory in Wasmtime.

Memories in Wasmtime are represented as an index into a store and don't have any data or destructor associated with the wasmtime_memory_t value. Memories cannot interoperate between wasmtime_store_t instances and if the wrong memory is passed to the wrong store then it may trigger an assertion to abort the process.

◆ wasmtime_table_t

Representation of a table in Wasmtime.

Tables in Wasmtime are represented as an index into a store and don't have any data or destructor associated with the wasmtime_table_t value. Tables cannot interoperate between wasmtime_store_t instances and if the wrong table is passed to the wrong store then it may trigger an assertion to abort the process.

Function Documentation

◆ wasmtime_extern_type()

wasm_externtype_t * wasmtime_extern_type ( wasmtime_context_t context,
wasmtime_extern_t val 
)

Returns the type of the wasmtime_extern_t defined within the given store.

Does not take ownership of context or val, but the returned wasm_externtype_t is an owned value that needs to be deleted.