summaryrefslogtreecommitdiffhomepage
path: root/src/wasm/nxt_wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/nxt_wasm.h')
-rw-r--r--src/wasm/nxt_wasm.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wasm/nxt_wasm.h b/src/wasm/nxt_wasm.h
index 6bc3ae35..90e91b2b 100644
--- a/src/wasm/nxt_wasm.h
+++ b/src/wasm/nxt_wasm.h
@@ -11,9 +11,11 @@
#include <nxt_unit.h>
-#include <wasm.h>
#if defined(NXT_HAVE_WASM_WASMTIME)
+#include <wasm.h>
#include <wasmtime.h>
+#elif defined(NXT_HAVE_WASM_WAMR)
+#include <wasm_export.h>
#endif
@@ -21,7 +23,9 @@
#define NXT_WASM_MEM_SIZE (32UL * 1024 * 1024)
#if defined(NXT_HAVE_WASM_WASMTIME)
-typedef wasmtime_func_t nxt_wasm_func_t;
+typedef wasmtime_func_t nxt_wasm_func_t;
+#elif defined(NXT_HAVE_WASM_WAMR)
+typedef wasm_function_inst_t nxt_wasm_func_t;
#endif
@@ -113,6 +117,7 @@ struct nxt_wasm_ctx_s {
nxt_wasm_func_handler_t fh[NXT_WASM_FH_NR];
char **dirs;
+ size_t nr_dirs;
nxt_unit_request_info_t *req;