This commit is contained in:
2026-02-03 11:14:25 +08:00
commit 8d6a720e8d
26 changed files with 35602 additions and 0 deletions

86
Cargo.toml Normal file
View File

@@ -0,0 +1,86 @@
[package]
name = "wl-webrtc"
version = "0.1.0"
edition = "2021"
authors = ["Your Name <your.email@example.com>"]
description = "Wayland to WebRTC remote desktop backend"
license = "MIT OR Apache-2.0"
[dependencies]
# Async Runtime
tokio = { version = "1.35", features = ["full"] }
async-trait = "0.1"
futures = "0.3"
async-channel = "2.2"
tokio-tungstenite = "0.21"
# Wayland & PipeWire
wayland-client = "0.31"
wayland-protocols = "0.31"
pipewire = { version = "0.8", optional = true }
ashpd = "0.8"
# Video Encoding
openh264 = { version = "0.6", optional = true }
x264 = { version = "0.4", optional = true }
vpx = { version = "0.1", optional = true }
# WebRTC
webrtc = "0.11"
# Memory & Zero-Copy
bytes = "1.5"
memmap2 = "0.9"
shared_memory = "0.12"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Error Handling
anyhow = "1.0"
thiserror = "1.0"
# System
libc = "0.2"
# Utilities
regex = "1.10"
uuid = { version = "1.6", features = ["v4", "serde"] }
chrono = "0.4"
clap = { version = "4.5", features = ["derive"] }
[lib]
name = "wl_webrtc"
path = "src/lib.rs"
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
[features]
default = ["openh264", "pipewire"]
hardware-encoding = []
software-encoding = ["openh264"]
all-encoders = ["software-encoding"]
pipewire = ["dep:pipewire"]
x264 = ["dep:x264"]
vpx = ["dep:vpx"]
[[bin]]
name = "wl-webrtc"
path = "src/main.rs"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[profile.dev]
opt-level = 0
debug = true