13 releases

Uses old Rust 2015

new 0.1.12+1.68.0 Feb 13, 2026
0.1.11+1.64.0 Jan 11, 2025
0.1.10+1.61.0 Apr 12, 2024
0.1.9+1.58.0 Jan 2, 2024
0.1.1 Nov 25, 2018

#54 in HTTP server

Download history 169256/week @ 2025-10-24 181656/week @ 2025-10-31 203966/week @ 2025-11-07 171839/week @ 2025-11-14 190683/week @ 2025-11-21 180177/week @ 2025-11-28 179418/week @ 2025-12-05 175352/week @ 2025-12-12 121033/week @ 2025-12-19 109947/week @ 2025-12-26 159854/week @ 2026-01-02 172628/week @ 2026-01-09 170838/week @ 2026-01-16 178017/week @ 2026-01-23 193389/week @ 2026-01-30 189107/week @ 2026-02-06

762,660 downloads per month
Used in 220 crates (3 directly)

MIT/Apache

8MB
217K SLoC

C 119K SLoC // 0.1% comments C++ 49K SLoC // 0.1% comments Ruby 30K SLoC // 0.2% comments Happy 7.5K SLoC Go 5.5K SLoC // 0.1% comments Python 2.5K SLoC // 0.2% comments Automake 1.5K SLoC // 0.2% comments Rust 1.5K SLoC // 0.0% comments M4 892 SLoC // 0.2% comments Batch 224 SLoC RPM Specfile 59 SLoC Shell 23 SLoC // 0.1% comments

Contains (obscure autoconf code, 45KB) nghttp2/configure.ac, (obscure autoconf code, 8KB) configure.ac

nghttp2-sys

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

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