|
| 1 | +# nginx-src |
| 2 | + |
| 3 | +This crate contains a vendored copy of the NGINX source and the logic to |
| 4 | +build it. It is intended to be consumed by the [nginx-sys] crate for CI |
| 5 | +builds, tests or rustdoc generation. |
| 6 | + |
| 7 | +It is notably not intended for producing binaries suitable for production |
| 8 | +use. For such scenaros we recommend building the ngx-rust based module |
| 9 | +against prebuilt packages from https://nginx.org/ or your preferred |
| 10 | +distribution. See the [nginx-sys] documentation for building ngx-rust |
| 11 | +modules against an existing pre-configured NGINX source tree. |
| 12 | + |
| 13 | +[nginx-sys]: https://docs.rs/nginx-sys/ |
| 14 | + |
| 15 | +## Versioning |
| 16 | + |
| 17 | +This crate follows the latest stable branch of NGINX. |
| 18 | + |
| 19 | + * The major and minor fields are taken from the NGINX version. |
| 20 | + * The patch version is incremented on changes to the build logic or crate |
| 21 | + metadata. |
| 22 | + * The version metadata contains full version of NGINX. |
| 23 | + |
| 24 | +## Build Requirements |
| 25 | + |
| 26 | +The crate can be built on common Unix-like operating systems and requires |
| 27 | +all the usual NGINX build dependencies (including development headers |
| 28 | +for the libraries) installed in system paths: |
| 29 | + |
| 30 | + * C compiler and toolchain |
| 31 | + * SSL library, OpenSSL or LibreSSL |
| 32 | + * PCRE or PCRE2 |
| 33 | + * Zlib or zlib-ng witn Zlib compatibile API enabled |
| 34 | + |
| 35 | +We don't intend to support Windows at the moment, as NGINX does not |
| 36 | +support dynamic modules for this target. |
| 37 | + |
| 38 | +## Environment variables |
| 39 | + |
| 40 | +Following variables can be set to customize the build. |
| 41 | + |
| 42 | + * `NGINX_CONFIGURE_ARGS` — additional arguments to pass to the NGINX configure |
| 43 | + script. |
| 44 | + |
| 45 | +Setting any of the following variables would result in downloading source |
| 46 | +archives from the network. |
| 47 | + |
| 48 | + * `NGINX_VERSION` — if specified, the version of NGINX to download and build |
| 49 | + instead of the one bundled with the crate. |
| 50 | + * `OPENSSL_VERSION` — if specified, the version of OpenSSL to download and |
| 51 | + use instead of the system-provided library. |
| 52 | + * `PCRE2_VERSION` — if specified, the version of PCRE2 to download and use |
| 53 | + instead of the system-provided library. |
| 54 | + * `ZLIB_VERSION` — if specified, the version of Zlib to download and use |
| 55 | + instead of the system-provided library. |
| 56 | + |
| 57 | +## License |
| 58 | + |
| 59 | +The code in this crate is licensed under [Apache License v2.0](LICENSE). |
| 60 | +The crate also contains the source code of NGINX, distributed under the |
| 61 | +[2-clause BSD License](nginx/LICENSE). |
0 commit comments