[package]
name = "prima_bridge"
version = "0.11.0"
authors = ["Matteo Giachino <matteog@gmail.com>"]
edition = "2021"
license = "MIT"
description = "A library to implement the bridge pattern"
repository = "https://github.com/primait/bridge.rs"
readme = "README.md"

[features]
default = ["async", "tracing_opentelemetry"]
blocking = ["reqwest/blocking"]
async = ["reqwest", "futures", "futures-util"]
tracing_opentelemetry = ["opentelemetry", "tracing", "tracing-opentelemetry"]
gzip = ["reqwest/gzip"]
auth0 = ["tokio", "rand", "redis", "jsonwebtoken", "chrono", "chrono-tz", "aes", "block-modes", "dashmap", "tracing"]

[dependencies]
reqwest = { version = "0.11.9", features = ["json", "blocking"], optional = true }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.78"
thiserror = "1.0.30"
tokio = { version = "1.16.1", features = ["macros"], optional = true }
uuid = { version = ">=0.7.0, <0.9.0", features = ["serde", "v4"] }
futures = { version = "0.3.21", optional = true }
futures-util = { version = "0.3.21", optional = true }
opentelemetry = { version = ">=0.17.0, <0.18.0", optional = true }
tracing = { version = "0.1.30", optional = true }
tracing-opentelemetry = { version = "0.17.0", optional = true }
async-trait = "0.1.52"
jsonwebtoken = { version = "8.0.1", optional = true }
redis = { version = "0.21.5", features = ["tokio-comp"], optional = true }
rand = { version = "0.8.4", optional = true }
chrono = { version = "^0.4", features = ["serde"], optional = true }
chrono-tz = { version = "^0.6", optional = true }
aes = { version = "0.7.5", optional = true }
block-modes = { version = "0.8.1", optional = true }
dashmap = { version = "5.1.0", optional = true }

[dev-dependencies]
tokio = { version = "1.16.1", features = ["macros"] }
mockito = "^0.30"
tokio-test = "0.4.2"
flate2 = "1.0.22"

[profile.release]
lto = "thin"
codegen-units = 1

[[example]]
name = "auth0"
path = "examples/auth0.rs"
required-features = ["auth0"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]


