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 documented in a "git book" that is hosted in the same repository as the user documentation.
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.
This release is tested with the following Nginx/OpenResty versions and dependencies:
Name | Version | Notes |
---|---|---|
Nginx | 1.25.1 | |
OpenResty | 1.21.4.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. |
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. |
- MacOS platforms (x86 and ARM64) linking ngx_wasm_module to Wasmtime: using daemon on results in a known crash of the Nginx master process.