| 78 | |
| 79 | template <typename F, typename... A> |
| 80 | static std::optional<Trap> invoke(F f, Caller cx, wasmtime_val_raw_t *raw, |
| 81 | A... args) { |
| 82 | auto ret = f(args...); |
| 83 | Results::store(cx, raw, ret); |
| 84 | return std::nullopt; |
| 85 | } |
| 86 | }; |
| 87 | |
| 88 | template <typename F, typename = void> struct WasmHostFunc; |