[package]
name = "hrpc"
version = "0.12.2"
authors = ["Yusuf Bera Ertan <y.bera003.06@protonmail.com>"]
edition = "2018"
license = "MIT"
repository = "https://github.com/harmony-development/hrpc-rs"
homepage = "https://github.com/harmony-development/hrpc-rs"
description = "Common code for hRPC."
keywords = ["hrpc", "harmony", "rpc"]

[features]
default = ["server", "client"]
server = [
    "axum",
    "axum-server",
    "tokio",
    "ahash",
    "dashmap",
    "tokio/macros",
    "hyper/server",
    "tower-http",
    "tower",
]
client = [
    "rustls-native-certs",
    "tokio-tungstenite",
    "tokio",
    "tokio-rustls",
    "hyper/client",
    "hyper-rustls",
    "tower-http",
    "tower",
]

[dependencies]
async-trait = "0.1"
prost = "0.8"
bytes = "1.0"
futures-util = "0.3"
tracing = "0.1"
http = "0.2"

dashmap = { version = "4.0", optional = true }
ahash = { version = "0.7", optional = true, default-features = false }
axum = { version = "0.2", default-features = false, features = [
    "http2",
    "ws",
], optional = true }
axum-server = { version = "0.2", features = ["tls-rustls"], optional = true }
hyper = { version = "0.14", features = ["http1", "http2", "runtime"] }
hyper-rustls = { version = "0.22", default-features = false, features = [
    "native-tokio",
], optional = true }
tower-http = { version = "0.1", default-features = false, features = [
    "compression-gzip",
    "decompression-gzip",
    "trace",
], optional = true }
tower = { version = "0.4", default-features = false, features = [
    "util",
], optional = true }

rustls-native-certs = { version = "0.5", optional = true }
tokio-tungstenite = { version = "0.15", features = [
    "rustls-tls",
], optional = true }
tokio = { version = "1.8", features = ["parking_lot"], optional = true }
tokio-rustls = { version = "0.22", optional = true }

parking_lot = "0.11"
flume = "0.10"

[package.metadata.nix]
build = true
library = true
