[package] name = "corex-event" version = "0.1.0" edition = "2021" rust-version = "1.75" license = "MIT OR Apache-2.0" repository = "https://github.com/asepharyana/mytheclipse" homepage = "https://github.com/asepharyana/mytheclipse" documentation = "https://docs.rs/corex-event" authors = ["asepharyana "] description = "Unified events & message bus abstraction: in-memory pub/sub dispatcher plus pluggable distributed broker backends (RabbitMQ, NATS)." readme = "README.md" keywords = ["events", "pubsub", "message-bus", "rabbitmq", "nats"] categories = ["asynchronous", "network-programming"] [features] default = ["mem"] # In-memory dispatcher (tokio broadcast channel), always cheap. mem = ["dep:tokio"] # Distributed broker backends. amqp = ["dep:lapin", "dep:futures-lite"] nats = ["dep:async-nats", "dep:futures-util", "dep:bytes"] [dependencies] tracing = "0.1" # Required unconditionally: the core `EventBus`/`Subscription` traits (always # compiled) use it. async-trait = "0.1" tokio = { version = "1.53", features = ["sync", "rt"], optional = true } serde = { version = "1", features = ["derive"] } serde_json = "1" # RabbitMQ (pure Rust AMQP 0.9.1 client). lapin = { version = "2", optional = true } futures-lite = { version = "2", optional = true } # NATS (pure Rust client). async-nats = { version = "0.38", optional = true } futures-util = { version = "0.3", optional = true } bytes = { version = "1", optional = true } [dev-dependencies] tokio = { version = "1.53", features = ["full"] }