Skip to main content

Installation

Eventflux can be installed from source or added as a dependency to your Rust project.

Prerequisites

  • Rust 1.70+ (stable)
  • Cargo (comes with Rust)
Verify Rust Installation
rustc --version
cargo --version

From Source

Clone and build the repository:

git clone https://github.com/eventflux-io/engine.git
cd engine
cargo build --release

Running Tests

Verify your installation by running the test suite:

cargo test

You should see 1,400+ passing tests.

Build Artifacts

After building, you'll find:

  • target/release/libeventflux.rlib - Library
  • target/release/run_eventflux - CLI binary

As a Dependency

Add Eventflux to your Cargo.toml:

[dependencies]
eventflux = { git = "https://github.com/eventflux-io/engine.git" }

Or with a specific revision:

[dependencies]
eventflux = { git = "https://github.com/eventflux-io/engine.git", rev = "main" }

Project Structure

After installation, your project structure should look like:

my-project/
├── Cargo.toml
├── src/
│ └── main.rs

With Cargo.toml:

[package]
name = "my-eventflux-app"
version = "0.1.0"
edition = "2021"

[dependencies]
eventflux = { git = "https://github.com/eventflux-io/engine.git" }

Verify Installation

Create a simple test file to verify everything works:

src/main.rs
use eventflux::prelude::*;

fn main() {
let manager = EventFluxManager::new();
println!("Eventflux initialized successfully!");
}

Run it:

cargo run

Optional Dependencies

For specific features, you may need additional dependencies:

FeatureDependencyPurpose
Redis StateredisDistributed state backend
Async RuntimetokioAsync event processing
SerializationserdeEvent serialization

Troubleshooting

Common Issues

Compilation takes too long

Enable incremental compilation:

Cargo.toml
[profile.dev]
incremental = true

Out of memory during compilation

Reduce parallelism:

CARGO_BUILD_JOBS=2 cargo build

Missing system dependencies

On Linux, ensure you have:

# Ubuntu/Debian
sudo apt-get install build-essential pkg-config

# Fedora
sudo dnf install gcc pkg-config

Next Steps

Once installed, proceed to the Quick Start guide to build your first streaming application.