#nginx

sys nginx

Rust bindings for Nginx

7 unstable releases (3 breaking)

0.4.1 Mar 9, 2019
0.4.0 Jan 9, 2019
0.3.0 Jan 1, 2019
0.2.0 Dec 2, 2018
0.1.2 Nov 27, 2018
Download history 74/week @ 2018-11-22 46/week @ 2018-11-29 32/week @ 2018-12-06 11/week @ 2018-12-13 39/week @ 2018-12-20 66/week @ 2018-12-27 74/week @ 2019-01-03 34/week @ 2019-01-10 52/week @ 2019-01-17 27/week @ 2019-01-24 2/week @ 2019-01-31 2/week @ 2019-02-07 7/week @ 2019-02-21 27/week @ 2019-02-28

115 downloads per month

MIT/Apache

9KB
147 lines

Nginx-rs

crates.io Documentation Build Status Crates.io Nginx

This crate provides Nginx bindings for Rust. Currently, only Linux is supported.

How to Use

  1. Add nginx crate to Cargo.toml
[dependencies]
nginx = "0.4"

Note: In order to build the crate, clang must be installed and the following command must be executed on the host:

sed -i 's:# define IPPORT_RESERVED:// #define IPPORT_RESERVED:' /usr/include/netdb.h

Build

It is recommended to use Docker to build the crate:

make build-image
make build

Note: The version of Nginx could be set using NGINX_VERSION environment variable, if it is not set, the default version is used:

NGINX_VERSION=1.15.8 cargo build

Some code were copied (and refactored) from nginxinc/ngx-rust.

No runtime deps

~1.5MB
~33K SLoC

  • build build.rs
  • build bindgen 0.30