[package]
name = "leap_client_rs"
version = "0.1.3"
edition = "2021"
license = "MPL-2.0"
authors = ["Hop Inc."]
description = "Rust client library for the Leap Edge socket service"
repository = "https://github.com/hopinc/leap_client_rs#readme"
homepage = "https://hop.io"
build = "build.rs"
keywords = ["hop", "leap_edge", "client", "channels", "async"]
categories = ["network-programming", "asynchronous", "tokio"]

[dependencies]
serde_json = "^1.0"
async-trait = "^0.1"
serde_repr = "^0.1"
log = "^0.4"

[dependencies.futures]
version = "0.3"
default-features = false
features = ["std"]

[dependencies.async-tungstenite]
version = "^0.22"
default-features = false
features = ["tokio-runtime"]

[dependencies.serde]
version = "^1.0"
features = ["derive"]

[dependencies.async-compression]
optional = true
version = "^0.4"
features = ["tokio", "zlib"]

[dependencies.tokio]
version = "^1.20"
features = ["macros", "net", "time", "sync", "io-util", "rt"]

[features]
# default to webpki roots for easy cross compilation
default = ["rustls-tls-webpki-roots", "zlib"]

# compression reduces the size of the websocket payloads 
zlib = ["async-compression"]

# allow for multiple different TLS backends
native-tls = ["async-tungstenite/tokio-native-tls"]
rustls-tls-native-roots = ["async-tungstenite/tokio-rustls-native-certs"]
rustls-tls-webpki-roots = ["async-tungstenite/tokio-rustls-webpki-roots"]

[dev-dependencies]
fern = "^0.6"

[dev-dependencies.tokio]
version = "^1.20"
features = ["full"]
