All releases are documented in a "git book" hosted in the project's repository: the user documentation. When consulting any file under this location, make sure to checkout the proper revision tag for your release.
To install the module, consult INSTALL.md.
For Nginx users, the module can be used through nginx.conf
directives,
documented in
DIRECTIVES.md.
OpenResty users can also expect to use ngx_wasm_module via the bundled LuaJIT FFI binding, for which no documentation exists at the moment.
Proxy-Wasm filters authors will be interested in PROXY_WASM.md for a primer on Proxy-Wasm in ngx_wasm_module and a picture of the supported Host ABI.
As for Nginx developers, the module can also be used to write other modules; the best resource for that sort of information would be DEVELOPER.md.
2024/10/23 - Prerelease
This prerelease is focused on the addition of various LuaJIT FFI APIs for manipulating ngx_wasm_module shared memory zones (i.e. key/value and metrics shms). It also contains a couple of memory leaks/pressure fixes and other minor improvements.
- Proxy-Wasm
- Feature: allow cancelling background ticks with
set_tick_period(0)
. - Bugfix: only inject shim headers after
on_response_headers
has been executed.
- Feature: allow cancelling background ticks with
- Wasmtime
- Bugfix: use POSIX signals on macOS instead of Mach ports.
- LuaJIT FFI
- Feature: implement getters & setters APIs for shms (key/value + metrics shms).
- Feature: implement user-defined histogram bins.
- Lua bridge
- Bugfix: resolve a potential memory leak when using the Lua resolver
(
proxy_wasm_lua_resolver
).
- Bugfix: resolve a potential memory leak when using the Lua resolver
(
- Misc
- Bugfix: avoid mounting memory pressure in long-lived connections by stashing the local response in the request pool.
- Bugfix: minor debug-mode fixes and resolve a few compilation warnings.
This release is tested with the following Nginx/OpenResty versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.27.2 | |
OpenSSL | 3.4.0 | |
Wasmtime | 26.0.0 | |
Wasmer | 3.1.1 | |
V8 | 12.0.267.17 | Built by Kong/ngx_wasm_runtimes for convenience. |
OpenResty | 1.27.1.1 | No binary, tested only. |
Same as 0.1.0.
N/A
2024/06/25 - Prerelease
This prerelease introduces support for Proxy-Wasm metrics and fixes a number of
issues related to the execution of Proxy-Wasm dispatches and Lua bridge threads
(proxy_wasm_lua_resolver
directive).
- Proxy-Wasm
- Feature: implement support for Proxy-Wasm ABI v0.2.1 metrics.
- Feature: allow setting the
:status
pseudo-header on response steps. - Bugfix: cancel dispatches when immediately producing a response before a scheduled dispatch starts.
- Misc: consistent context checks for all request/response header setters.
- Misc: dispatch errors do not interrupt filter chains anymore.
- Wasmtime
- Feature: new
cache_config
directive to enable compilation cache.
- Feature: new
- V8
- Bugfix: prevent a segfault loading an empty
.wat
module with V8.
- Bugfix: prevent a segfault loading an empty
- LuaJIT FFI
- Bugfix: allow
proxy_wasm.load()
to fail and be invoked again.
- Bugfix: allow
- Lua bridge
- Bugfix: properly support multiple parallel yielding Lua threads (e.g.
proxy_wasm_lua_resolver
directive).
- Bugfix: properly support multiple parallel yielding Lua threads (e.g.
- Misc
- Feature: new
postpone_rewrite
andpostpone_access
directives. - Bugfix: resume content phase when reading request body produced EAGAIN.
- Bugfix: fix memory reallocation when a key/value pair has its value replaced by a larger one.
- Feature: new
This release is tested with the following Nginx versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.27.0 | |
OpenSSL | 3.3.1 | |
Wasmtime | 19.0.0 | |
Wasmer | 3.1.1 | |
V8 | 12.0.267.17 | Built by Kong/ngx_wasm_runtimes for convenience. |
OpenResty | 1.25.3.1 | No binary, tested only. |
Same as 0.1.0.
N/A
2024/02/22 - Prerelease
This prerelease contains several improvements for scheduling Proxy-Wasm dispatch
calls and producing local responses. It also changes the eof
flag behavior on
request/response headers steps.
- Proxy-Wasm
- Feature: enable multiple parallel dispatch calls.
- Feature: cancel pending calls when one produces a response.
- Feature: support
send_local_response
duringon_response_headers
step. - Bugfix: always pass
eof=false
duringon_{request|response_body
steps. - Bugfix: properly unlink trapped instances from root contexts.
- Bugfix: periodically sweep the root context store.
- Bugfix: always reschedule background ticks.
- WASI
- Bugfix: prevent out of bounds access in
wasi_environ_get
.
- Bugfix: prevent out of bounds access in
- Misc
- Bugfix: link libatomic with libwee8 on non-macOS builds.
- Bugfix: update Nginx time after loading a module for more accurate logs.
This release is tested with the following Nginx versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.25.4 | |
OpenSSL | 3.2.1 | |
Wasmtime | 14.0.3 | |
Wasmer | 3.1.1 | |
V8 | 12.0.267.17 | Built by Kong/ngx_wasm_runtimes for convenience. |
OpenResty | 1.25.3.1 | No binary, tested only. |
Same as 0.1.0.
N/A
2023/12/06 - Prerelease
This prerelease contains a major refactor and several fixes for low isolation
modes in Proxy-Wasm filter chains (i.e. stream
, none
).
It also implements several usability features for Proxy-Wasm filters and users of lua-resty-wasmx.
Finally, the bump to Wasmtime 14.0.3 also resolves a known issue of the previous prerelease.
- Proxy-Wasm
- Feature: implement support for response body buffering during
on_response_body
. - Feature: implement context checks in multiple host functions (e.g.
proxy_get_buffer_bytes
, etc...). - Bugfix: improve effectiveness and robustness of Wasm instances
recycling and lifecycle in low isolation modes (i.e.
stream
,none
). - Bugfix: resolve a memory leak in
ngx_proxy_wasm_maps_set
in low isolation modes. - Bugfix: resolve a memory leak during a dispatched call edge-case.
- Feature: implement support for response body buffering during
- WASI
- Bugfix: resolve a memory leak in
fd_write
in low isolation modes.
- Bugfix: resolve a memory leak in
- LuaJIT FFI
- Feature: custom Lua-land getters/setters callbacks for Proxy-Wasm host properties.
- Bugfix: resolve a possible segfault when no
wasm{}
block is configured.
- Misc
- Bugfix: proper order of Nginx filter modules in dynamic OpenResty builds.
This release is tested with the following Nginx/OpenResty versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.25.3 | |
OpenSSL | 3.2.0 | |
Wasmtime | 14.0.3 | |
Wasmer | 3.1.1 | |
V8 | 11.4.183.23 | Built by Kong/ngx_wasm_runtimes for convenience. |
OpenResty | 1.21.4.2 | No binary, tested only. |
Same as 0.1.0.
N/A
2023/10/06 - Prerelease
This prerelease contains fixes and a few minor improvements atop the initial prerelease.
An important fix contained in this changeset is the resolution of a memory leak
that occurred when using Proxy-Wasm filter chains with the none
isolation
mode.
- Proxy-Wasm
- Feature: add support for Unix domain sockets in HTTP dispatch calls.
- Bugfix: resolve a memory leak when using low isolation modes (i.e.
none
). - Bugfix: ensure the whole filter chain is executed in response steps.
- Bugfix: ensure the rest of the filter chain is executed after HTTP dispatch responses.
- Bugfix: prevent a crash when reading maps from non-HTTP contexts.
- Bugfix: prevent HTTP dispatch calls from having multiple Host and Connection headers.
- Misc: improve the clarity of some filter chain error messages.
- Wasmtime
- Feature: set
RUST_BACKTRACE=full
whenbacktraces
is enabled. - Bugfix: allow overriding the
WASMTIME_BACKTRACE_DETAILS
environment variable. - Misc: compatibility with Wasmtime 12.0.2 which resolves the known issue documented in 0.1.0.
- Perf: avoid heap allocations in most host function calls.
- Feature: set
- Wasmer
- Feature: set
RUST_BACKTRACE=full
whenbacktraces
is enabled.
- Feature: set
- LuaJIT FFI
- Bugfix: prevent a crash when the stream subsystem is in use.
- Bugfix: resolve a memory leak when using
get/set_property
ininit_worker_by_lua
.
- Lua bridge
- Bugfix: avoid a use-after-free with the latest OpenResty 1.21.4.2 release.
- Misc
- Bugfix: fix compilation errors with newer clang and gcc versions.
This release is tested with the following Nginx/OpenResty versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.25.2 | |
OpenSSL | 3.1.3 | |
Wasmtime | 12.0.2 | |
Wasmer | 3.1.1 | |
V8 | 11.4.183.23 | Built by Kong/ngx_wasm_runtimes for convenience. |
OpenResty | 1.21.4.2 | No binary, tested only. |
Same as 0.1.0.
- When using Wasmtime, reloading Nginx with
SIGHUP
seems to leave workers susceptible to crashes on Wasm instance exceptions such asSIGFPE
. See #418. Resolved in 0.2.0
2023/07/30 - Prerelease
This initial prerelease proposes a programmable Nginx module for executing Wasm bytecode in Nginx and/or OpenResty: ngx_wasm_module.
The module must be linked to one of three supported WebAssembly runtimes: Wasmtime, Wasmer, or V8.
Along with a programmable "Nginx Wasm VM" interface, this release also comes with initial support for Proxy-Wasm filters (i.e. Proxy-Wasm Host environment), and a number of surrounding libraries for peripheral or optional usage of the module.
This release is tested with the following Nginx/OpenResty versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.25.1 | |
OpenSSL | 1.1.1u | |
Wasmtime | 8.0.1 | |
Wasmer | 3.1.1 | |
V8 | 11.4.183.23 | Built by Kong/ngx_wasm_runtimes for convenience. |
OpenResty | 1.21.4.1 | No binary, tested only. |
Relevant components are automatically built when necessary as part of the Nginx
./configure
step.
This release bundles the following components, not independently versioned:
Name | Notes |
---|---|
ngx-wasm-rs | A Rust library used when linking to Wasmer or V8. Ensures feature-parity across runtimes such as detailed backtraces and .wat format support. |
v8bridge | A bridge library exposing C++ V8 features to ngx_wasm_module's C. |
lua-resty-wasmx | A LuaJIT FFI binding exposing some of ngx_wasm_module's features via Lua. |