make webrtc-rs optional feature

This commit is contained in:
lc
2025-11-13 16:53:04 +08:00
parent 442160d704
commit 8ae4651bc7
6 changed files with 223 additions and 232 deletions

View File

@@ -6,6 +6,10 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["webrtc"]
webrtc = ["dep:webrtc"]
[dependencies]
# new flexi_logger failed on rustc 1.75
flexi_logger = { version = "0.27", features = ["async"] }
@@ -61,7 +65,7 @@ rustls-pki-types = "1.11"
rustls-native-certs = "0.8"
webpki-roots = "1.0.4"
async-recursion = "1.1"
webrtc = "0.14.0"
webrtc = { version = "0.14.0", optional = true }
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
mac_address = "1.1"
@@ -73,7 +77,7 @@ protobuf-codegen = { version = "3.7" }
[dev-dependencies]
clap = "4.5.51"
webrtc-signal = "0.1.1"
webrtc = "0.14.0"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = [