This crate provides nginx bindings for Rust. Currently, only Linux is supported.
nginx
crate to Cargo.tomltoml
[dependencies]
nginx = "0.6"
Note: In order to build the crate, clang
must be installed and the following command must be executed on the host:
sh
sed -i 's:# define IPPORT_RESERVED:// #define IPPORT_RESERVED:' /usr/include/netdb.h
It is recommended to use Docker to build the crate:
sh
make build-image
make build
NGINX_VERSION
Determines the version of nginx, if it is not set, the default version is used.NGINX_PATH
Determines the local absolute path of pre-cloned nginx, if it is not set, nginx is downloaded.Some code were copied (and refactored) from nginxinc/ngx-rust.