#sys #bindings #nghttp2

sys libnghttp2-sys

FFI bindings for libnghttp2 (nghttp2)

3 releases

new 0.1.2 Aug 13, 2019
0.1.1 Nov 25, 2018
0.1.0 Sep 12, 2018
Download history 8424/week @ 2019-04-30 7058/week @ 2019-05-07 7635/week @ 2019-05-14 10429/week @ 2019-05-21 12002/week @ 2019-05-28 12078/week @ 2019-06-04 12097/week @ 2019-06-11 12175/week @ 2019-06-18 9965/week @ 2019-06-25 8856/week @ 2019-07-02 6998/week @ 2019-07-09 7230/week @ 2019-07-16 8827/week @ 2019-07-23 7859/week @ 2019-07-30 7606/week @ 2019-08-06

40,871 downloads per month
Used in 43 crates (1 directly)

MIT/Apache

5.5MB
147K SLoC

C 72K SLoC // 0.1% comments C++ 42K SLoC // 0.1% comments Ruby 18K SLoC // 0.2% comments Happy 6.5K SLoC Go 3.5K SLoC // 0.1% comments Python 2K SLoC // 0.3% comments Rust 1.5K SLoC // 0.7% comments Automake 805 SLoC // 0.3% comments Batch 183 SLoC JavaScript 124 SLoC // 0.1% comments RPM Specfile 59 SLoC Shell 9 SLoC

nghttp2-sys

A common library for linking nghttp2 to rust programs (also known as libnghttp2).

Build Status Build status

Generating bindings

Before bindgen:

  • Copy nghttp2ver.h.in to nghttp2ver.h
  • Edit nghttp2ver.h to remove @FOO@, replacing with 0
$ bindgen \
  ./nghttp2/lib/includes/nghttp2/nghttp2.h \
  -o src/lib.rs \
  --no-layout-tests \
  --distrust-clang-mangling \
  --no-prepend-enum-name \
  --rustfmt-bindings \
  --whitelist-function '.*nghttp2.*' \
  --whitelist-type '.*nghttp2.*' \
  --whitelist-var '.*nghttp2.*' \
  -- \
  -I ./nghttp2/lib/includes

Afterwards

  • Remove *vprintf*
  • Remove va_list-related things
  • Add #![allow(bad_style)]

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in nghttp2-sys by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies