Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pull_requests_lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: Install librdkafka build dependencies
run: sudo apt-get update && sudo apt-get install -y cmake libcurl4-openssl-dev
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/rust_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@ jobs:

# setup wasmedge
- run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -p /usr/local
# Setup musl if needed
# Install native librdkafka build dependencies on Linux
- run: sudo apt-get update
if: matrix.target == 'x86_64-unknown-linux-musl'
if: startsWith(matrix.target, 'x86_64-unknown-linux-')
- run: sudo apt-get install -y cmake libcurl4-openssl-dev
if: startsWith(matrix.target, 'x86_64-unknown-linux-')
# Setup musl if needed
- run: sudo apt-get install -y musl musl-dev musl-tools cmake
if: matrix.target == 'x86_64-unknown-linux-musl'
# librdkafka 2.12.1 includes curl headers even with WITH_CURL=0.
# Expose only those headers, not glibc's system headers, to musl-gcc.
- run: sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/x86_64-linux-musl/curl
if: matrix.target == 'x86_64-unknown-linux-musl'
# # Caching stuff
- uses: actions/cache@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ uuid = { version = "1", features = ["v4"] }
actix-web = { version = "4", optional = true }
actix-http = { version = "3", optional = true }
reqwest-lib = { version = "^0.12", default-features = false, features = ["rustls-tls"], optional = true, package = "reqwest" }
rdkafka-lib = { version = "^0.38", features = ["cmake-build"], optional = true, package = "rdkafka" }
rdkafka-sys = { version = "<4.10", optional = true }
rdkafka-lib = { version = "0.39", features = ["cmake-build"], optional = true, package = "rdkafka" }
rdkafka-sys = { version = "^4.10", optional = true }
warp-lib = { version = "^0.3", optional = true, package = "warp" }
async-trait = { version = "^0.1", optional = true }
bytes = { version = "^1.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion example-projects/rdkafka-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ serde_json = "^1.0"
futures = "^0.3"
tokio = { version = "^1.0", features = ["full"] }
clap = "2.33.1"
rdkafka = { version = "^0.38", features = ["cmake-build"] }
rdkafka = { version = "0.39", features = ["cmake-build"] }
6 changes: 6 additions & 0 deletions src/binding/rdkafka/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
//! This library provides Kafka protocol bindings for CloudEvents
//! using the [rust-rdkafka](https://fede1024.github.io/rust-rdkafka) library.
//!
//! Building this binding requires a C compiler and CMake. With librdkafka 2.12.1,
//! curl development headers are also required even when curl support is disabled.
//! On Debian/Ubuntu, install `cmake` and `libcurl4-openssl-dev`. For musl builds,
//! make the curl headers available in the musl compiler's include path without
//! adding glibc's system headers. This does not enable or link curl support.
//!
//! To produce Cloudevents:
//!
//! ```
Expand Down