rdkafka-sys

Low level bindings to librdkafka, a C library for the [Apache Kafka] protocol with producer, consumer, and admin clients.

For a safe wrapper, see the [rdkafka] crate.

Version

The rdkafka-sys version number is in the format X.Y.Z+RX.RY.RZ, where X.Y.Z is the version of this crate and follows SemVer conventions, while RX.RY.RZ is the version of the bundled librdkafka.

Note that versions before v2.0.0+1.4.2 did not follow this convention, and instead directly correspond to the bundled librdkafka version.

Build

Known issues

Features

By default a submodule with the librdkafka sources will be used to compile and statically link the library.

The dynamic-linking feature can be used to link rdkafka to a locally installed version of librdkafka: if the feature is enabled, the build script will use pkg-config to check the version of the library installed in the system, and it will configure the compiler to dynamically link against it. The system version of librdkafka must exactly match the version of librdkafka bundled with this crate.

The cmake-build feature builds librdkafka with its [CMake] build system, rather than its default [mklove]-based build system. This feature requires that CMake is installed on the build machine.

The following features directly correspond to librdkafka features (i.e., flags you would pass to configure if you were compiling manually).

All features are disabled by default unless noted otherwise above. The build process is defined in [build.rs].