Files
piik/prototype/channel-native/Cargo.toml
T
AAA 9597b7c159 refactor(native): use public RTC helper crates
Keep str0m as the transport engine and retain only the existing H264 parser patch with one shared error and marshal identity. Preserve candidate signaling and VP8 PictureID semantics through narrow Native-owned types and public helper APIs.

Align the existing peer fixture with production's completed-turn encoding reconciliation; the prior H264 timeout reproduced unchanged on 932 before this test-only correction.
2026-11-01 07:00:30 -04:00

90 lines
5.1 KiB
TOML

[package]
name = "piik-channel-native"
version = "0.1.0"
edition = "2021"
rust-version = "1.91"
publish = false
default-run = "piik-channel-native"
[workspace]
[features]
default = ["capture"]
capture = ["dep:ashpd", "dep:reis", "dep:gst", "dep:gst-app", "dep:gst-video", "dep:cidre", "dep:windows-capture", "dep:wasapi", "dep:rusty-opus", "dep:ndk", "dep:ndk-context", "dep:jni", "dep:khronos-egl", "dep:glow"]
[dependencies]
bytes = "=1.12.1"
piik-channel-core = { path = "../channel-core", features = ["sqlite"] }
str0m = { version = "=0.24.1", default-features = false, features = ["rust-crypto"] }
rtc-rtp = "=0.21.1"
rtc-rtcp = "=0.21.1"
rtc-media = "=0.21.1"
rtc-shared = { version = "=0.21.1", default-features = false, features = ["marshal"] }
rtc-ice = "=0.21.1"
rtc-stun = "=0.21.1"
rtc-turn = "=0.21.1"
rtc-crypto = { version = "=0.21.1", default-features = false, features = ["crypto-ring"] }
sansio = "1"
portmapper = { version = "=0.20.0", git = "https://github.com/TNTcraftHIM/net-tools", rev = "0a61bb64facc469d015f5ba537dda57c94cdcb17", default-features = false }
netwatch = { version = "=0.20.0", git = "https://github.com/TNTcraftHIM/net-tools", rev = "0a61bb64facc469d015f5ba537dda57c94cdcb17" }
socket2 = "0.6"
noq-udp = "=1.4.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "net", "sync", "signal", "time", "process", "io-util", "io-std"] }
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-native-roots"] }
futures-util = { version = "0.3", features = ["sink"] }
anyhow = "1"
async-trait = "0.1"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
uuid = { version = "=1.16.0", features = ["v4", "serde"] }
getrandom = "=0.3.4"
aes-gcm = "=0.10.3"
base64 = "=0.22.1"
sha2 = "=0.10.9"
subtle = "=2.6.1"
[target.'cfg(target_os = "android")'.dependencies]
ndk = { version = "=0.9.0", optional = true, features = ["api-level-29", "media"] }
ndk-context = { version = "0.1", optional = true }
jni = { version = "0.22", optional = true }
khronos-egl = { version = "=6.0.0", optional = true, features = ["static", "no-pkg-config"] }
glow = { version = "=0.16.0", optional = true }
libc = "0.2"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
rustls-platform-verifier = "=0.7.1"
[target.'cfg(unix)'.dependencies]
rustix = { version = "1", features = ["fs"] }
[target.'cfg(target_os = "macos")'.dependencies]
cidre = { version = "=0.29.0", optional = true, default-features = false, features = ["sc", "vt", "iio", "async", "io_surface", "macos_13_0"] }
libc = "0.2"
objc2-core-foundation = { version = "=0.3.2", default-features = false, features = ["std", "CFArray", "CFDictionary", "CFNumber", "CFString", "CFCGTypes"] }
objc2-core-graphics = { version = "=0.3.2", default-features = false, features = ["std", "CGEvent", "CGEventTypes", "CGEventSource", "CGRemoteOperation", "CGDisplayConfiguration", "CGDirectDisplay", "CGWindow", "CGGeometry", "libc"] }
objc2-application-services = { version = "=0.3.2", default-features = false, features = ["std", "HIServices", "AXUIElement", "AXError", "AXValue", "libc"] }
objc2-app-kit = { version = "=0.3.2", default-features = false, features = ["std", "NSEvent"] }
[target.'cfg(target_os = "linux")'.dependencies]
ashpd = { version = "=0.13.13", optional = true, default-features = false, features = ["tokio", "screencast", "remote_desktop", "global_shortcuts"] }
reis = { version = "=0.7.1", optional = true }
rustix = { version = "1", features = ["time", "net"] }
gst = { package = "gstreamer", version = "=0.24.5", optional = true, features = ["v1_20"] }
gst-app = { package = "gstreamer-app", version = "=0.24.5", optional = true, features = ["v1_20"] }
gst-video = { package = "gstreamer-video", version = "=0.24.5", optional = true, features = ["v1_20"] }
[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux", target_os = "android"))'.dependencies]
rusty-opus = { version = "=1.0.2", optional = true }
# Temporary upstream H264 parser fix: webrtc-rs/rtc#308; removal in README.md.
[patch.crates-io]
rtc-rtp = { git = "https://github.com/TNTcraftHIM/rtc", rev = "3b6d3c0a03a641a92aff7518418c6eeb67cf1444" }
# The parser's public errors and marshal traits share this unchanged crate.
rtc-shared = { git = "https://github.com/TNTcraftHIM/rtc", rev = "3b6d3c0a03a641a92aff7518418c6eeb67cf1444" }
[target.'cfg(windows)'.dependencies]
vigem-rust = { version = "=0.2.0", default-features = false, features = ["x360"] }
wasapi = { version = "=0.26.0", optional = true }
windows-capture = { version = "=2.0.1", optional = true }
windows-core = "=0.62.2"
windows = { version = "=0.62.2", features = ["Win32_Foundation", "Win32_System_JobObjects", "Win32_System_Com", "Win32_System_Com_StructuredStorage", "Win32_System_Ole", "Win32_System_Variant", "Win32_System_Threading", "Win32_System_Performance", "Win32_UI_WindowsAndMessaging", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_HiDpi", "Win32_Graphics_Gdi", "Win32_Graphics_Dwm", "Win32_Graphics_Direct3D", "Win32_Graphics_Direct3D11", "Win32_Graphics_Direct3D10", "Win32_Graphics_Dxgi", "Win32_Graphics_Dxgi_Common", "Win32_Media_MediaFoundation", "Win32_Media_Audio", "Win32_Security"] }