[package]
name = "str0m"
version = "0.17.0"
authors = ["Martin Algesten <martin@algesten.se>", "Hugo Tunius <h@tunius.se>", "Davide Bertola <dade@dadeb.it>"]
description = "WebRTC library in Sans-IO style"
license = "MIT OR Apache-2.0"
repository = "https://github.com/algesten/str0m"
readme = "README.md"
keywords = ["webrtc", "streaming", "video", "audio", "media"]
categories = ["web-programming", "multimedia", "network-programming"]
edition = "2024"
exclude = ["/cargo_deny.sh", "/deny.toml", "/run-fuzz.sh"]

# MSRV
rust-version = "1.85.0"

# Notes on OpenSSL
# - Vendored (static link source build) ensures version consistency and easier
#   to build but increases size.
# - Non-vendored (dynamic link) uses system libraries, reducing size but may
#   cause compatibility issues.
# Choose based on security and footprint needs.
# For large deployments sharing OS images, OS updates can be easier for
# security patching than updating statically linked software.

[features]
default = ["aws-lc-rs", "examples"]
aws-lc-rs = ["dep:str0m-aws-lc-rs"]
rust-crypto = ["dep:str0m-rust-crypto"]
openssl = ["dep:str0m-openssl"]
wincrypto = ["dep:str0m-wincrypto"]
apple-crypto = ["dep:str0m-apple-crypto"]
vendored = ["str0m-openssl?/vendored"]
unversioned = []

# Redacts personally identifiable information (PII) from logs debug and above
pii = []

# The examples require TLS for the web server via rouille.
# We use rustls instead of ssl to avoid OpenSSL dependency issues on Windows.
examples = ["rouille/rustls"]

_internal_dont_use_log_stats = []
_internal_test_exports = ["str0m-proto/_internal_test_exports"]

[dependencies]
tracing = "0.1.37"
fastrand = "2.0.1"
sctp-proto = "0.8.1"
combine = "4.6.6"
subtle = "2.0.0"
arrayvec = "0.7.6"

# STUN
crc = "3"
serde = { version = "1.0.152", features = ["derive"] }

# DTLS made for str0m (required dependency)
dimpl = { version = "0.4.3", default-features = false }

time = "0.3"

str0m-proto = { version = "0.2.0", path = "proto" }

# Crypto providers
str0m-aws-lc-rs = { version = "0.2.0", path = "crypto/aws-lc-rs", optional = true }
str0m-rust-crypto = { version = "0.2.0", path = "crypto/rust-crypto", optional = true }
str0m-openssl = { version = "0.2.0", path = "crypto/openssl", optional = true }

[target.'cfg(target_vendor = "apple")'.dependencies]
str0m-apple-crypto = { version = "0.2.0", path = "crypto/apple-crypto", optional = true }

[target.'cfg(windows)'.dependencies]
# Windows Crypto (CNG + SChannel)
str0m-wincrypto = { version = "0.4.0", path = "crypto/wincrypto", optional = true }

[dev-dependencies]
rouille = { version = "3.6.2", features = [] }
str0m-rust-crypto = { version = "0.2.0", path = "crypto/rust-crypto" }
netem = { package = "str0m-netem", version = "0.2.0", path = "netem" }

tempfile = "3"
url = "2"

serde_json = "1.0"
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "std"] }
systemstat = "0.2.2"
pcap-file = "2.0.0"
regex = "1.11.1"
rand = "0.9.0"

# dummy package that enables "_internal_test_exports"
_str0m_test = { path = "_str0m_test" }

[[example]]
name = "chat"
required-features = ["examples"]

[[example]]
name = "http-post"
required-features = ["examples"]
