public static unsafe object ToObject(wasm_val_t *v) { switch (v->kind) { case Interop.wasm_valkind_t.WASM_I32: return(v->of.i32); case Interop.wasm_valkind_t.WASM_I64: return(v->of.i64); case Interop.wasm_valkind_t.WASM_F32: return(v->of.f32); case Interop.wasm_valkind_t.WASM_F64: return(v->of.f64); // TODO: support AnyRef default: throw new NotSupportedException("Unsupported value kind."); } }
public static unsafe extern void wasm_global_set(IntPtr global, wasm_val_t *value);
public static unsafe extern GlobalHandle wasm_global_new(StoreHandle handle, GlobalTypeHandle globalType, wasm_val_t *initialValue);
public static unsafe extern IntPtr wasm_func_call(IntPtr function, wasm_val_t *args, wasm_val_t *results);