[package]
name = "rsipstack"
version = "0.5.14"
edition = "2021"
description = "SIP Stack Rust library for building SIP applications"
license = "MIT"
repository = "https://github.com/restsend/rsipstack"
readme = "README.md"
keywords = ["sip", "voip", "telephony", "sipstack"]
authors = ["jinti<shenjindi@fourz.cn>"]
categories = ["network-programming", "multimedia"]


[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "bench_ua"
path = "src/bin/bench_ua.rs"

[dependencies]
async-trait = "0.1.89"
futures = "0.3.32"
thiserror = "2.0.18"
tracing = "0.1.44"
tokio-util = { version = "0.7.18", features = ["full"] }
tracing-subscriber = { version = "0.3.22", features = ["local-time"] }
rand = { version = "0.10.1" }
md-5 = "0.11.0"
sha2 = "0.11.0"
if-addrs = "0.14"
hickory-resolver = { version = "0.26.1", features = [
    "system-config",
    "tokio",
], optional = true }
bytes = "1.11.1"
memchr = "2"
futures-util = "0.3.32"
parking_lot = "0.12"
dashmap = "6"
tokio-tungstenite = { version = "0.29.0", optional = true }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12", "logging"], optional = true }
rustls-pki-types = { version = "1", features = ["alloc"], optional = true }
rustls = { version = "0.23", default-features = false, features = ["ring"] }
base64 = "0.22"
clap = { version = "4.5.53", features = ["derive"] }
socket2 = { version = "0.6.3", features = ["all"] }

[features]
default = ["rustls", "websocket", "srv_lookup"]
srv_lookup = ["dep:hickory-resolver"]
rustls = ["tokio-rustls", "rustls-pki-types"]
websocket = ["tokio-tungstenite"]
all-transports = ["rustls", "websocket", "srv_lookup"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { version = "1.50.0", features = ["time", "sync", "macros", "io-util"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.50.0", features = ["full"] }

[dev-dependencies]
dotenvy = "0.15.7"
tempfile = "3"
sdp-rs = "0.2.1"
rtp-rs = "0.6.0"
axum = { version = "0.8.8", features = ["ws"] }
tower = "0.5.3"
tower-http = { version = "0.6.8", features = ["fs", "cors"] }
http = "1.4.0"

[[example]]
name = "client"
path = "examples/client/main.rs"

[[example]]
name = "proxy"
path = "examples/proxy.rs"
