support recent wasm modules
This commit is contained in:
parent
954d6a6565
commit
203aa84365
0
angie/mod.dist/.wamr.preseed
Normal file
0
angie/mod.dist/.wamr.preseed
Normal file
0
angie/mod.dist/.wasm.preseed
Normal file
0
angie/mod.dist/.wasm.preseed
Normal file
0
angie/mod.dist/.wasmtime.preseed
Normal file
0
angie/mod.dist/.wasmtime.preseed
Normal file
1
angie/mod.dist/core-wamr.conf
Normal file
1
angie/mod.dist/core-wamr.conf
Normal file
@ -0,0 +1 @@
|
||||
load_module modules.d/ngx_wamr_module.so;
|
2
angie/mod.dist/core-wasm.conf
Normal file
2
angie/mod.dist/core-wasm.conf
Normal file
@ -0,0 +1,2 @@
|
||||
load_module modules.d/ngx_wasm_module.so;
|
||||
load_module modules.d/ngx_wasm_core_module.so;
|
1
angie/mod.dist/core-wasmtime.conf
Normal file
1
angie/mod.dist/core-wasmtime.conf
Normal file
@ -0,0 +1 @@
|
||||
load_module modules.d/ngx_wasmtime_module.so;
|
1
angie/mod.dist/http-wasm.conf
Normal file
1
angie/mod.dist/http-wasm.conf
Normal file
@ -0,0 +1 @@
|
||||
load_module modules.d/ngx_http_wasm_host_module.so;
|
@ -32,6 +32,23 @@ for i in ${NGX_CORE_MODULES:-} ; do
|
||||
done
|
||||
unset i
|
||||
|
||||
if [ -n "${core_modules:-}" ] ; then
|
||||
## angie-module-wamr: depends on angie-module-wasm
|
||||
## angie-module-wasmtime: depends on angie-module-wasm
|
||||
unset want_wasm
|
||||
want_wasm=0
|
||||
if list_have_item "${core_modules}" wamr ; then
|
||||
want_wasm=1
|
||||
elif list_have_item "${core_modules}" wasmtime ; then
|
||||
want_wasm=1
|
||||
fi
|
||||
if [ ${want_wasm} = 1 ] ; then
|
||||
## forcefully move 'wasm' to beginning of list
|
||||
core_modules=$(printf '%s' " ${core_modules} " | sed -zE 's/ wasm / /;s/^/wasm/;s/ $//')
|
||||
fi
|
||||
unset want_wasm
|
||||
fi
|
||||
|
||||
set -a
|
||||
NGX_CORE_MODULES="${core_modules}"
|
||||
NGX_CORE_CONFLOAD=$(sort_dedup_list "${core_confload}")
|
||||
|
@ -47,9 +47,9 @@ else
|
||||
http_confload="${http_confload} v2"
|
||||
fi
|
||||
|
||||
## angie-module-lua: depends on angie-module-ndk
|
||||
## angie-module-set-misc: depends on angie-module-ndk
|
||||
if [ -n "${http_modules:-}" ] ; then
|
||||
## angie-module-lua: depends on angie-module-ndk
|
||||
## angie-module-set-misc: depends on angie-module-ndk
|
||||
unset want_ndk
|
||||
want_ndk=0
|
||||
if list_have_item "${http_modules}" lua ; then
|
||||
@ -62,6 +62,28 @@ else
|
||||
http_modules=$(printf '%s' " ${http_modules} " | sed -zE 's/ ndk / /;s/^/ndk/;s/ $//')
|
||||
fi
|
||||
unset want_ndk
|
||||
|
||||
## angie-module-wasm: http module requires core module to be loaded
|
||||
unset want_wasm
|
||||
want_wasm=0
|
||||
if list_have_item "${http_modules}" wasm ; then
|
||||
want_wasm=1
|
||||
fi
|
||||
if [ ${want_wasm} = 1 ] ; then
|
||||
unset have_core_wasm
|
||||
have_core_wasm=0
|
||||
if list_have_item "${NGX_CORE_MODULES}" wasm ; then
|
||||
have_core_wasm=1
|
||||
fi
|
||||
if [ ${have_core_wasm} = 0 ] ; then
|
||||
log_always "adjusting NGX_CORE_MODULES to include 'wasm'"
|
||||
|
||||
NGX_CORE_MODULES=$(append_list "${NGX_CORE_MODULES}" wasm)
|
||||
export NGX_CORE_MODULES
|
||||
fi
|
||||
unset have_core_wasm
|
||||
fi
|
||||
unset want_wasm
|
||||
fi
|
||||
|
||||
set -a
|
||||
|
Loading…
x
Reference in New Issue
Block a user