[package]
name = "kolibri-net"
version = "0.1.2"
edition = "2021"
description = "Qlyra binary protocol core: packet codec, framing, compression, transport"
license = "MIT OR Apache-2.0"
readme = "README.md"

[lib]
name = "kolibri_net"

[features]
default = ["transport", "calls"]
transport = ["dep:tokio", "dep:tokio-rustls", "dep:rustls", "dep:webpki-roots", "dep:rustls-pemfile"]
calls = [
    "transport",
    "json",
    "dep:tokio-tungstenite",
    "dep:futures-util",
]
json = ["dep:serde_json", "dep:base64"]

[dependencies]
rmpv = "1"
lz4_flex = { version = "0.11", features = ["frame"] }
zstd = "0.13"
thiserror = "2"
sha2 = "0.10"
tokio = { version = "1", features = ["net", "io-util", "fs", "rt", "sync", "time", "macros"], optional = true }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"], optional = true }
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"], optional = true }
webpki-roots = { version = "0.26", optional = true }
rustls-pemfile = { version = "2", optional = true }
tokio-tungstenite = { version = "0.26", default-features = false, features = ["connect", "rustls-tls-webpki-roots"], optional = true }
futures-util = { version = "0.3", default-features = false, features = ["sink"], optional = true }
serde_json = { version = "1", optional = true }
base64 = { version = "0.22", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
rcgen = "0.13"
rmpv = "1"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] }
sha2 = "0.10"
tokio-tungstenite = "0.26"
futures-util = "0.3"
serde_json = "1"
lz4_flex = { version = "0.11", features = ["frame"] }
base64 = "0.22"
