openrtc 1.0.4

OpenRTC: a Rust-first P2P runtime for device discovery, signaling, and iroh/QUIC networking.
Documentation
[package]
name = "openrtc"
version = "1.0.4"
edition = "2021"
rust-version = "1.91"
description = "OpenRTC: a Rust-first P2P runtime for device discovery, signaling, and iroh/QUIC networking."
license-file = "LICENSE"
homepage = "https://openrtc.app"
repository = "https://github.com/bluestarburst/openrtc"
documentation = "https://docs.rs/openrtc"
autobins = false

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

[package.metadata.wasm-pack.profile.release]
# Run binaryen wasm-opt to shrink the module and strip metadata sections.
# `-Oz` size-optimizes and (by default) drops the `name` section that otherwise
# preserves every internal function name; the explicit strip flags remove debug
# info and the toolchain `producers` section as well.
wasm-opt = [
    "-Oz",
    "--strip-debug",
    "--strip-producers",
    "--enable-bulk-memory",
    "--enable-nontrapping-float-to-int",
]

[features]
default = []
# Chosen over `str0m` for now because this crate already ships with stable
# multi-platform interoperability in adjacent desktop code paths, reducing
# integration risk for browser/native DataChannel parity during initial rollout.
transport-webrtc = ["dep:webrtc"]
# Keep MoQ behind an explicit opt-in because WebTransport adds a sizable
# native dependency tree and is unnecessary for the default iroh-only path.
transport-moq = ["dep:moq-native-ietf", "dep:moq-transport", "dep:url"]
transport-lan = ["dep:iroh-mdns-address-lookup"]
# Reserved until the BLE transport fork has a crates.io release compatible with
# iroh 1.x. Keeping this feature empty lets the OpenRTC crate publish without
# shipping an unpublished git dependency.
transport-ble = []
# The Rust actor is an unfinished experiment: it has no production dial or
# logical-channel integration. Keep it opt-in so it cannot become a second
# lifecycle authority beside the runtime-owned TypeScript scoped actor.
experimental-scoped-actor = []
test-harness = ["dep:axum", "dep:tower-http", "dep:openrtc-file-transfer", "dep:wtransport", "transport-lan"]

[[bin]]
name = "test-harness"
path = "src/bin/test_harness.rs"
required-features = ["test-harness"]

[dependencies]
# Common
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
anyhow = "1.0"
base64 = "0.22"
sha2 = "0.10"
hex = "0.4"
chacha20poly1305 = { version = "0.10.1", default-features = false, features = ["alloc"] }
hkdf = "0.12"
x25519-dalek = { version = "2.0.1", features = ["static_secrets"] }

# Iroh Shared
# iroh 1.0.0 stable. The workspace [patch.crates-io] redirects iroh/iroh-relay to
# the vendored fork (vendor/iroh) carrying the QUIC relay carriage; the fork is
# rebased onto 1.0.0. See docs/operations/dependency-tracking.md.
iroh = { version = "=1.0.0", default-features = false, features = ["tls-ring"] }
iroh-tickets = "1.0.0"
bytes = "1.11.0"
futures = "0.3.31"
async-channel = "2.3.1"
n0-future = "0.3"
tokio-stream = { version = "0.1.17", default-features = false, features = ["sync"] }
tokio-util = { version = "0.7.17", features = ["compat", "codec"] }
async-trait = "0.1"
clap = { version = "4.5.60", features = ["derive"] }

# Native specific
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.37", features = ["full"] }
uuid = { version = "1", features = ["v4", "v5"] }
getrandom = "0.2"
chrono = { version = "0.4", features = ["clock"] }
rustls = { version = "0.23", features = ["ring"] }
webrtc = { version = "0.17", optional = true }
# Used by the WebRTC transport's runtime IPv6 probe to decide whether to
# advertise IPv6 NetworkTypes to webrtc-rs. iroh already pulls this in
# transitively, so adding it as a direct dep does not enlarge the build.
netdev = "0.43"
# Draft 14 is the Cloudflare relay's current wire contract. Keep these exact
# versions aligned: moq-native-ietf 0.9.0 depends on moq-transport 0.14.
moq-native-ietf = { version = "=0.9.0", optional = true }
moq-transport = { version = "=0.14.2", optional = true }
url = { version = "2", optional = true }
# The deterministic Draft 14 harness uses wtransport only to mint a self-signed
# certificate whose digest the browser pins explicitly.
wtransport = { version = "0.7.1", optional = true, features = ["dangerous-configuration"] }
iroh-mdns-address-lookup = { version = "0.4.0", optional = true }

[target.'cfg(all(not(target_arch = "wasm32"), not(any(target_os = "ios", target_os = "android"))))'.dependencies]
firestore = { version = "0.49.0", default-features = false, features = ["tls-webpki-roots"] }
gcloud-sdk = { version = "0.30.0", default-features = false, features = ["google-firestore-v1", "tls-webpki-roots"] }
axum = { version = "0.8", optional = true }
tower-http = { version = "0.6", features = ["cors"], optional = true }
open = "5"
openrtc-file-transfer = { path = "../openrtc-file-transfer", version = "1.0.1", optional = true }

[target.'cfg(target_os = "windows")'.dependencies]
wmi = "0.14"

# Wasm specific
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.92"
js-sys = "0.3.69"
wasm-bindgen-futures = "0.4.42"
console_error_panic_hook = "0.1.7"
getrandom = { version = "0.2", features = ["js"] }
tokio = { version = "1.37", default-features = false, features = ["sync", "macros", "rt"] }
wasm-streams = "0.5.0"
serde-wasm-bindgen = "0.6"
gloo-timers = { version = "0.3.0", features = ["futures"] }

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3.69"
features = [
  "console",
  "Document",
  "RtcPeerConnection",
  "RtcDataChannel",
  "RtcDataChannelInit",
  "RtcConfiguration",
  "RtcIceServer",
  "RtcIceTransportPolicy",
  "RtcSessionDescription",
  "RtcSessionDescriptionInit",
  "RtcSdpType",
  "RtcIceCandidate",
  "RtcIceCandidateInit",
  "RtcPeerConnectionIceEvent",
  "RtcDataChannelEvent",
  "Window",
  "Event",
  "CustomEvent",
  "CustomEventInit",
  "MessageEvent",
  "Headers",
  "ReadableStream",
  "ReadableStreamDefaultReader",
  "Request",
  "RequestInit",
  "RequestMode",
  "Response",
]

[build-dependencies]
cfg_aliases = "0.2"