[package] name = "just-webrtc-signalling" version = "0.2.1" edition = "2021" authors = ["Reece Kibble "] categories = ["network-programming", "web-programming", "wasm", "game-development"] keywords = ["webrtc", "peer", "wasm", "networking", "peer-to-peer"] description = "Just simple, fast and easy signalling for full-mesh WebRTC connections on native and wasm" documentation = "https://docs.rs/just-webrtc-signalling" repository = "https://github.com/uniciant/just-webrtc/tree/main/crates/just-webrtc-signalling" license = "MIT OR Apache-2.0" rust-version = "1.75.0" readme = "README.md" exclude = [".git*"] [dependencies] prost = "0.13" log = { version = "0.4", optional = true } thiserror = { version = "1.0", optional = true } anyhow = { version = "1.0", optional = true } bincode = { version = "1.3", optional = true } futures-util = { version = "0.3", optional = true } serde = { version = "1.0", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] tonic = { version = "0.12", default-features = false, features = ["prost", "codegen"], optional = true } # no included transport layer tonic-web-wasm-client = { version = "0.6", optional = true } # transport layer for tonic clients over WASM [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tonic = { version = "0.12", default-features = false, features = ["prost", "codegen", "transport", "tls"], optional = true } # include native transport layer flume = { version = "0.11", default-features = false, features = ["async"], optional = true } async-broadcast = { version = "0.7.0", optional = true } async-stream = { version = "0.3.5", optional = true } tower-http = { version = "0.6", features = ["cors"], optional = true } http = { version = "1.1", optional = true } tonic-web = { version = "0.12", optional = true } [build-dependencies] tonic-build = { version = "0.12", default-features = false, features = ["prost", "transport"] } # transport is disabled for wasm within build script [dev-dependencies] anyhow = "1.0" pretty_env_logger = "0.5" tokio = { version = "1.36", features = ["rt", "macros"] } [features] default = ["server", "server-web", "client"] server = [ "dep:tonic", "dep:flume", "dep:async-broadcast", "dep:async-stream", "dep:log", "dep:futures-util", ] server-web = [ "server", "dep:tower-http", "dep:http", "dep:tonic-web", ] client = [ "dep:tonic", "dep:tonic-web-wasm-client", "dep:bincode", "dep:thiserror", "dep:anyhow", "dep:futures-util", "dep:serde", "dep:log", ]