#bindings #low-level #api-bindings #open-dht #opendht-c

sys opendht-sys

Low-level bindings to the OpenDHT C library

2 stable releases

1.0.1 Feb 26, 2025

#1448 in Network programming

Download history 284/week @ 2025-02-26

284 downloads per month

GPL-3.0 license

640KB
16K SLoC

C++ 14K SLoC // 0.1% comments C 1K SLoC // 0.0% comments M4 683 SLoC // 0.1% comments Automake 110 SLoC Rust 62 SLoC // 0.2% comments Shell 1 SLoC

Contains (obscure autoconf code, 9KB) vendor/opendht/configure.ac

Low-level bindings to the OpenDHT C library

Stability: Active GitHub release (latest SemVer) CI Crates.io Docs.rs

Building opendht-sys

Steps we take

  1. pkg-config is used to find the opendht-c library on the current system.
  2. cmake is tried next with the opendht source in ./vendor/opendht.

Build Requirements

If we build via cmake, we need the following installed first (Debian or Ubuntu):

  • fmt-dev
  • pkg-config
  • libgnutls28-dev - yes, on crates.io
  • libmsgpack-dev - no
  • libargon2-dev - yes, on crates.io
  • libasio-dev - no
  • libfmt-dev - no, needed?
  • nettle-dev - yes, on crates.io
  • ninja-build

-sys crates

TODO: All of the above will be -sys crates and set as dependencies in our Cargo.toml file.

Dependencies

~0–2.3MB
~47K SLoC