From 8f6449f4e0152d9644b807cf2208e3734a0f8b4d Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 10 Oct 2023 20:54:39 +0100 Subject: [WIP] Wasm: Add a WAMR based language module Signed-off-by: Andrew Clayton --- src/wasm/nxt_wasm.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/wasm/nxt_wasm.h') 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 -#include #if defined(NXT_HAVE_WASM_WASMTIME) +#include #include +#elif defined(NXT_HAVE_WASM_WAMR) +#include #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; -- cgit