[package]
name = "lifeline"
version = "0.5.0"
description = "Lifeline is a dependency injection library for asynchronous message-based applications."
keywords = ["async", "tokio", "async", "actor", "actors"]
categories = ["asynchronous", "rust-patterns", "web-programming"]
readme = "README.md"
authors = ["Austin Jones <implAustin@gmail.com>"]
documentation = "https://docs.rs/lifeline/"
homepage = "https://github.com/austinjones/lifeline-rs"
repository = "https://github.com/austinjones/lifeline-rs"
edition = "2018"
license = "MIT"

[badges]
maintenance = { status = "actively-developed" }

[dependencies]
pin-project = "0.4.23"
futures-util = { version = "0.3", default-features = false }

arc-swap = { version = "0.4", optional = true }
lockfree = { version = "0.5", optional = true }

async-trait = "0.1"
thiserror = "1.0"
anyhow = "1.0"

log = "0.4"
regex = "1.3"

tokio = { version = "1.0", default-features = false, optional = true }
tokio-stream = { version = "0.1", optional = true }
async-std = { version = "1.8", default-features = false, optional = true }

[dev-dependencies]
anyhow = "1.0"
simple_logger = "1.9"
tokio = { version = "1.0", features = ["sync", "time", "macros", "rt-multi-thread"] }

[features]
default = ["barrier-channel", "dyn-bus", "tokio-executor", "tokio-channels"]

dyn-bus = []

tokio-executor = ["tokio/rt"]
tokio-channels = ["tokio-stream", "tokio/sync"]

async-std-executor = ["async-std/default"]
async-std-channels = ["async-std/unstable"]
async-std-attributes = ["async-std/attributes"]

subscription-channel = []
barrier-channel = ["arc-swap", "lockfree"]

[[example]]
name = "async-std"
required-features = ["dyn-bus", "async-std-executor", "async-std-channels"]

[[example]]
name = "subscription"
required-features = ["tokio-channels", "subscription-channel"]

[[example]]
name = "shutdown"
required-features = ["barrier-channel"]