Skip to content

Commit f2f9bf3

Browse files
committed
doc: document integration with the NGINX buildsystem
1 parent a12bb45 commit f2f9bf3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ Example modules are available in [examples](examples) folder. You can use `cargo
7575
For example (all examples plus linux specific):
7676
`cargo build --package=examples --examples --features=linux`
7777

78+
### Build with external NGINX source tree
79+
80+
If you require a custom NGINX configuration, you can build a module against an existing pre-configured source tree.
81+
To do that, you need to set the `NGX_OBJS` variable to an _absolute_ path to the NGINX build directory (`--builddir`, defaults to the `objs` in the source directory).
82+
Only `./configure` step of the NGINX build is mandatory, as bindings don't depend on any of the artifacts generated by `make`.
83+
84+
Furthermore, this could be leveraged to build a module as a part of the NGINX build process with `--add-module`/`--add-dynamic-module` options of the configure script.
85+
See example integration scripts at [`examples/config`](examples/config) and [`examples/config.make`](examples/config.make).
86+
7887
### Docker
7988

8089
We provide a multistage [Dockerfile](Dockerfile):

0 commit comments

Comments
 (0)