Welcome! Log In Create A New Profile

Advanced

[njs] Updated README with QuickJS module build instructions.

Anonymous User
October 23, 2024 01:20AM
details: https://github.com/nginx/njs/commit/073a34c51ea6222554386453d5605eaf60a479df
branches: master
commit: 073a34c51ea6222554386453d5605eaf60a479df
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue, 22 Oct 2024 18:10:25 -0700
description:
Updated README with QuickJS module build instructions.


---
README.md | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/README.md b/README.md
index 5beac3c0..855d9c0b 100644
--- a/README.md
+++ b/README.md
@@ -258,6 +258,12 @@ sudo apt install gcc make
sudo apt install libpcre3-dev zlib1g-dev libssl-dev libxml2-dev libxslt-dev
```

+For building with [QuickJS](https://nginx.org/en/docs/njs/engine.html), you will also need to clone the QuickJS repository:
+
+```bash
+git clone https://github.com/bellard/quickjs
+```
+
> [!WARNING]
> This is the minimal set of dependency libraries needed to build NGINX and NJS. Other dependencies may be required if you choose to build NGINX with additional modules. Monitor the output of the `configure` command discussed in the following sections for information on which modules may be missing.

@@ -306,6 +312,12 @@ To build NGINX JavaScript as a dynamic module, execute the following commands fr
auto/configure --add-dynamic-module=<NJS_SRC_ROOT_DIR>/nginx
```

+To build with [QuickJS](https://nginx.org/en/docs/njs/engine.html) support, provide include and library path using `--with-cc-opt=` and `--with-ld-opt=` options:
+```bash
+auto/configure --add-dynamic-module=<NJS_SRC_ROOT_DIR>/nginx \
+ --with-cc-opt="-I<QUICKJS_SRC_ROOT_DIR>" --with-ld-opt="-L<QUICKJS_SRC_ROOT_DIR>"
+```
+
> [!WARNING]
> By default, this method will only build the `ngx_http_js_module` module. To use NJS with the NGINX Stream module, you'll need to enable it during the `configure` step so it builds with the NGINX binary. Doing so will automatically compile the `ngx_stream_js_module` module when NJS is added to the build. One way of accomplishing this is to alter the `configure` step to:
> ```bash
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Updated README with QuickJS module build instructions.

Anonymous User 195 October 23, 2024 01:20AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 130
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready