forked from api7/wasm-nginx-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
61 lines (57 loc) · 1.84 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 2022 Shenzhen ZhiLiu Technology Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ngx_module_type=HTTP
ngx_module_name=ngx_http_wasm_module
ngx_module_srcs=" \
$ngx_addon_dir/src/http/ngx_http_wasm_module.c \
$ngx_addon_dir/src/http/ngx_http_wasm_api.c \
$ngx_addon_dir/src/http/ngx_http_wasm_call.c \
$ngx_addon_dir/src/http/ngx_http_wasm_state.c \
$ngx_addon_dir/src/proxy_wasm/proxy_wasm_map.c \
$ngx_addon_dir/src/proxy_wasm/proxy_wasm_memory.c \
$ngx_addon_dir/src/vm/wasmtime.c \
$ngx_addon_dir/src/vm/vm.c \
"
ngx_module_deps=" \
$ngx_addon_dir/src/http/ngx_http_wasm_api_def.h \
$ngx_addon_dir/src/vm/vm.h \
"
ngx_module_incs=" \
$ngx_addon_dir/src \
$ngx_addon_dir/wasmtime-c-api/include \
"
ngx_module_libs=" \
-L$ngx_addon_dir/wasmtime-c-api/lib -lwasmtime \
"
if [ -d $ngx_addon_dir/wasmedge ]; then
# if wasmedge is installed
wasmedge_path=$ngx_addon_dir/wasmedge
ngx_module_srcs=" \
$ngx_module_srcs \
$ngx_addon_dir/src/vm/wasmedge.c \
"
ngx_module_incs=" \
$ngx_module_incs \
$wasmedge_path/include \
"
ngx_module_libs=" \
$ngx_module_libs \
-L$wasmedge_path/lib -lwasmedge_c \
"
echo "Build with WasmEdge enabled"
have=NGX_WASM_HAVE_WASMEDGE . auto/have
fi
. auto/module
ngx_addon_name=$ngx_module_name