Skip to content

Commit

Permalink
chore(wasm): rename ngx_wasm_module => ngx_wasmx_module
Browse files Browse the repository at this point in the history
  • Loading branch information
flrgh committed Mar 20, 2024
1 parent 828c755 commit 021bdbd
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ install_webui_cmd = select({

install_wasm_deps_cmd = select({
"@kong//:wasmx_flag": """
for fname in $(locations @ngx_wasm_module//:lua_libs); do
base=${fname##*/ngx_wasm_module/lib/}
for fname in $(locations @ngx_wasmx_module//:lua_libs); do
base=${fname##*/ngx_wasmx_module/lib/}
dest="${BUILD_DESTDIR}/openresty/lualib/$base"
mkdir -p "$(dirname "$dest")"
cp -v "$fname" "$dest"
Expand Down Expand Up @@ -97,7 +97,7 @@ kong_directory_genrule(
],
}) + select({
"@kong//:wasmx_flag": [
"@ngx_wasm_module//:lua_libs",
"@ngx_wasmx_module//:lua_libs",
"@openresty//:wasm_runtime",
],
"//conditions:default": [],
Expand Down
8 changes: 4 additions & 4 deletions build/kong_bindings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def _load_vars(ctx):

content += '"OPENRESTY_PATCHES": [%s],' % (", ".join(patches))

ngx_wasm_module_remote = ctx.os.environ.get("NGX_WASM_MODULE_REMOTE", "https://github.com/Kong/ngx_wasm_module.git")
content += '"NGX_WASM_MODULE_REMOTE": "%s",' % ngx_wasm_module_remote
ngx_wasmx_module_remote = ctx.os.environ.get("NGX_WASM_MODULE_REMOTE", "https://github.com/Kong/ngx_wasm_module.git")
content += '"NGX_WASM_MODULE_REMOTE": "%s",' % ngx_wasmx_module_remote

ngx_wasm_module_branch = ctx.os.environ.get("NGX_WASM_MODULE_BRANCH", "")
content += '"NGX_WASM_MODULE_BRANCH": "%s",' % ngx_wasm_module_branch
ngx_wasmx_module_branch = ctx.os.environ.get("NGX_WASM_MODULE_BRANCH", "")
content += '"NGX_WASM_MODULE_BRANCH": "%s",' % ngx_wasmx_module_branch

ctx.file("BUILD.bazel", "")
ctx.file("variables.bzl", "KONG_VAR = {\n" + content + "\n}")
Expand Down
2 changes: 1 addition & 1 deletion build/openresty/BUILD.openresty.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ configure_make(
"@openresty_binding//:all_srcs",
] + select({
"@kong//:wasmx_flag": [
"@ngx_wasm_module//:all_srcs",
"@ngx_wasmx_module//:all_srcs",
# wasm_runtime has to be a "data" (target) instead of "build_data" (exec)
# to be able to lookup by its path (relative to INSTALLDIR)
":wasm_runtime",
Expand Down
4 changes: 2 additions & 2 deletions build/openresty/wasmx/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ wasmx_configure_options = select({
"//conditions:default": [],
}) + select({
"@kong//:wasmx_static_mod": [
"--add-module=$$EXT_BUILD_ROOT$$/external/ngx_wasm_module",
"--add-module=$$EXT_BUILD_ROOT$$/external/ngx_wasmx_module",
],
"@kong//:wasmx_dynamic_mod": [
"--with-compat",
"--add-dynamic-module=$$EXT_BUILD_ROOT$$/external/ngx_wasm_module",
"--add-dynamic-module=$$EXT_BUILD_ROOT$$/external/ngx_wasmx_module",
],
"//conditions:default": [],
})
Expand Down
2 changes: 1 addition & 1 deletion build/openresty/wasmx/wasmx_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def wasmx_repositories():
wasm_module_branch = KONG_VAR["NGX_WASM_MODULE"]

new_git_repository(
name = "ngx_wasm_module",
name = "ngx_wasmx_module",
branch = wasm_module_branch,
remote = KONG_VAR["NGX_WASM_MODULE_REMOTE"],
build_file_content = """
Expand Down
4 changes: 2 additions & 2 deletions kong/conf_loader/parse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,9 @@ local function check_and_parse(conf, opts)
errors[#errors + 1] = err
end

if conf.wasm and check_dynamic_module("ngx_wasm_module") then
if conf.wasm and check_dynamic_module("ngx_wasmx_module") then
local err
conf.wasm_dynamic_module, err = lookup_dynamic_module_so("ngx_wasm_module", conf)
conf.wasm_dynamic_module, err = lookup_dynamic_module_so("ngx_wasmx_module", conf)
if err then
errors[#errors + 1] = err
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/explain_manifest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def transform(f: FileInfo):
f.runpath = expected_rpath
# otherwise remain unmodified

if f.path.endswith("/modules/ngx_wasm_module.so"):
if f.path.endswith("/modules/ngx_wasmx_module.so"):
expected_rpath = "/usr/local/openresty/luajit/lib:/usr/local/kong/lib:/usr/local/openresty/lualib"
if f.rpath and expected_rpath in f.rpath:
f.rpath = expected_rpath
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/amazonlinux-2-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libdl.so.2
- libm.so.6
Expand Down Expand Up @@ -202,7 +202,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/amazonlinux-2023-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -188,7 +188,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/amazonlinux-2023-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -169,7 +169,7 @@
- lua-kong-nginx-module/stream
- lua-resty-events
- lua-resty-lmdb
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/debian-10-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libdl.so.2
- libm.so.6
Expand Down Expand Up @@ -202,7 +202,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/debian-11-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libdl.so.2
- libm.so.6
Expand Down Expand Up @@ -191,7 +191,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/debian-12-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -178,7 +178,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/el7-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libdl.so.2
- libm.so.6
Expand All @@ -201,7 +201,7 @@
- lua-kong-nginx-module/stream
- lua-resty-events
- lua-resty-lmdb
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/el8-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libdl.so.2
- libm.so.6
Expand Down Expand Up @@ -201,7 +201,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/el9-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -188,7 +188,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/el9-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -169,7 +169,7 @@
- lua-kong-nginx-module/stream
- lua-resty-events
- lua-resty-lmdb
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/ubuntu-20.04-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libdl.so.2
- libm.so.6
Expand Down Expand Up @@ -195,7 +195,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/ubuntu-22.04-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -182,7 +182,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down
4 changes: 2 additions & 2 deletions scripts/explain_manifest/fixtures/ubuntu-22.04-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
- libc.so.6
- ld-linux-aarch64.so.1

- Path : /usr/local/openresty/nginx/modules/ngx_wasm_module.so
- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
Expand All @@ -180,7 +180,7 @@
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasm_module
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True
Expand Down

0 comments on commit 021bdbd

Please sign in to comment.