Installation

Getting started with Kincir is straightforward. This guide will walk you through the steps to add Kincir to your Rust project.

Requirements

Kincir requires:

Adding Kincir to Your Project

Add Kincir to your Cargo.toml file:

[dependencies]
kincir = "0.1.0"

Enabling Specific Message Broker Backends

Kincir uses feature flags to keep dependencies minimal. Enable only the backends you need:

[dependencies]
kincir = { version = "0.1.0", features = ["kafka", "rabbitmq"] }

Available features include:

Verifying Installation

To verify that Kincir is correctly installed, create a simple Rust program:

use kincir::prelude::*;

fn main() {
    println!("Kincir version: {}", kincir::VERSION);
}

Compile and run the program:

cargo run

If everything is set up correctly, you should see the Kincir version printed to the console.

System Dependencies

Depending on which message broker backends you enable, you might need to install additional system libraries.

Kafka Backend

If you’re using the Kafka backend (kafka feature), you’ll need:

Ubuntu/Debian:

sudo apt-get install librdkafka-dev libssl-dev

macOS (using Homebrew):

brew install librdkafka openssl

RabbitMQ Backend

If you’re using the RabbitMQ backend (rabbitmq feature), you’ll need:

Ubuntu/Debian:

sudo apt-get install librabbitmq-dev

macOS (using Homebrew):

brew install rabbitmq-c

Next Steps

Once you have Kincir installed, you can proceed to the Quick Start guide to learn how to create publishers and subscribers.