event_hex 0.0.3

A pragmatic Rust toolkit for Domain-Driven Design with first-class support for event sourcing and CQRS.
Documentation
[package]
name = "event_hex"
version = "0.0.3"
edition = "2024"
description = "A pragmatic Rust toolkit for Domain-Driven Design with first-class support for event sourcing and CQRS."
keywords = ["hexagonal", "architecture", "ddd", "event-sourcing", "cqrs"]
categories = ["data-structures", "asynchronous", "rust-patterns"]
readme = "README.md"
license = "MIT OR Apache-2.0"
authors = ["develnk <develnk@gmail.com>"]
repository = "https://github.com/develnk/event_hex.git"
homepage = "https://github.com/develnk/event_hex.git"
documentation = "https://docs.rs/event_hex"
rust-version = "1.95.0"

[dependencies]
tokio = { version = "1.52.3", features = ["macros", "rt-multi-thread"] }
# Serialization/Deserialization
serde = { version = "1.0.228", features = ["derive", "serde_derive"] }
serde_with = { version = "3.20.0" }
serde_json = "1.0.149"
# Uuid generation
uuid = { version = "1.23.1", features = ["serde", "v4", "fast-rng", "v7"] }
# Time
chrono = { version = "0.4.44", features = ["serde"] }
# Build async trait
async-trait = "0.1.89"
# Builder pattern
typed-builder = { version = "0.23.2" }
# Sql library for async impl
sqlx = { version = "0.8.0", features = ["runtime-tokio-native-tls", "uuid", "json", "chrono"], optional = true }
bb8 = "0.9.1"

# MongoDB
bson = { version = "3.1.0", features = ["uuid-1", "serde_with-3", "serde"], optional = true }
mongodb = { version = "3.6.0", features = ["bson-3"], optional = true }

# Kafka library
rdkafka = { version = "0.39.0", features = ["ssl-vendored"], optional = true }
# Rabbit library
lapin = { version = "4.7.2", optional = true }
# Base
derive-getters = "0.5.0"
erased-serde = "0.4.10"
config = { version = "0.15.22", optional = true }
sha2 = "0.11.0"
bincode = { version = "2.0.1", features = ["serde"] }
thiserror = "2.0.18"
downcast-rs = "2.0.2"
futures = "0.3.32"
tracing = "0.1"

[dev-dependencies]
tokio = { version = "1.52.3", features = ["full"] }
mockall = "0.14"

[features]
default = []
postgres = ["sqlx", "sqlx/postgres"]
mongo = ["mongodb", "bson"]
kafka = ["rdkafka"]
rabbit = ["lapin"]

[profile.dev]
debug = true
overflow-checks = true
debug-assertions = true
opt-level = 0
lto = false
panic = "unwind"
strip = "none"
incremental = true
codegen-units = 256
rpath = false

[profile.release]
# Disable all debug information
debug = false
# Use abort instead of unwind for smaller code
panic = "abort"
# Maximum optimization
lto = "fat"
# Optimize for size
opt-level = 3
# This removes a few hundred bytes from the final exec size
codegen-units = 1
# Strips debug info.
strip = "symbols"
debug-assertions = false
overflow-checks = false