Wasmtime
func.hh File Reference
#include <wasmtime/_func_class.hh>
#include <wasmtime/_val_class.hh>

Go to the source code of this file.

Macros

#define NATIVE_WASM_TYPE(native, valkind, field)
 

Macro Definition Documentation

◆ NATIVE_WASM_TYPE

#define NATIVE_WASM_TYPE (   native,
  valkind,
  field 
)
Value:
template <> struct WasmType<native> { \
static const bool valid = true; \
static ValType valtype() { return ValType::valkind(); } \
static void store(Store::Context cx, wasmtime_val_raw_t *p, \
const native &t) { \
(void)cx; \
p->field = t; \
} \
static native load(Store::Context cx, wasmtime_val_raw_t *p) { \
(void)cx; \
return p->field; \
} \
};
Container for possible wasm values.
Definition: val.h:290

Helper macro to define WasmType definitions for primitive types like int32_t and such.