Files

293 lines
12 KiB
TOML
Raw Permalink Normal View History

2021-03-29 15:59:14 +08:00
[package]
name = "rustdesk"
2026-09-01 08:57:33 +08:00
version = "1.5.0"
2021-03-29 15:59:14 +08:00
authors = ["rustdesk <info@rustdesk.com>"]
edition = "2021"
2021-03-29 15:59:14 +08:00
build= "build.rs"
description = "RustDesk Remote Desktop"
2022-05-12 17:35:25 +08:00
default-run = "rustdesk"
2023-12-29 16:42:23 +08:00
rust-version = "1.75"
2022-05-12 17:35:25 +08:00
[lib]
name = "librustdesk"
2023-02-23 18:03:40 +08:00
crate-type = ["cdylib", "staticlib", "rlib"]
2022-05-12 17:35:25 +08:00
[[bin]]
2022-05-13 20:30:22 +08:00
name = "naming"
path = "src/naming.rs"
2021-03-29 15:59:14 +08:00
[[bin]]
name = "service"
path = "src/service.rs"
2021-03-29 15:59:14 +08:00
[features]
inline = []
2026-09-10 16:00:58 +08:00
use_samplerate = ["samplerate", "libsamplerate-sys"]
2021-08-01 11:01:04 +08:00
use_rubato = ["rubato"]
use_dasp = ["dasp"]
flutter = ["flutter_rust_bridge"]
2022-09-12 12:31:02 +08:00
default = ["use_dasp"]
2022-06-09 19:46:41 +08:00
hwcodec = ["scrap/hwcodec"]
2024-04-12 17:26:24 +08:00
vram = ["scrap/vram"]
mediacodec = ["scrap/mediacodec"]
drm = ["scrap/drm"]
# The display wake, as its OWN compile gate on top of `drm`. Everything else in the drm backend
# READS (it captures a scanout); the wake WRITES, injecting one synthetic pointer event from the
# root service so a compositor that idle-disabled its outputs re-enables them. That is a different
# kind of operation and deserves a switch that can remove it from the binary entirely, without
# giving up DRM capture: `--features drm` builds the capture path with no wake code compiled in.
drm-wake = ["drm"]
2023-05-20 07:20:24 +02:00
linux-pkg-config = ["magnum-opus/linux-pkg-config", "scrap/linux-pkg-config"]
unix-file-copy-paste = [
"dep:x11-clipboard",
"dep:x11rb",
"dep:percent-encoding",
"dep:once_cell",
"clipboard/unix-file-copy-paste",
]
2024-11-23 18:41:27 +08:00
screencapturekit = ["cpal/screencapturekit"]
2021-03-29 15:59:14 +08:00
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
async-trait = "0.1"
scrap = { path = "libs/scrap", features = ["wayland"] }
2026-09-06 00:21:28 +08:00
hbb_common = { path = "libs/hbb_common", features = ["webrtc"] }
base = { path = "libs/base" }
2021-03-29 15:59:14 +08:00
serde_derive = "1.0"
serde = "1.0"
serde_json = "1.0"
2023-05-30 15:32:19 +08:00
serde_repr = "0.1"
2021-03-29 15:59:14 +08:00
cfg-if = "1.0"
lazy_static = "1.4"
2021-12-26 15:34:10 +08:00
sha2 = "0.10"
2021-03-29 15:59:14 +08:00
repng = "0.2"
zstd = "0.13"
xxhash-rust = { version = "0.8", features = ["xxh3"] }
2024-02-14 12:18:49 +08:00
parity-tokio-ipc = { git = "https://github.com/rustdesk-org/parity-tokio-ipc" }
magnum-opus = { git = "https://github.com/rustdesk-org/magnum-opus" }
2021-08-01 11:01:04 +08:00
dasp = { version = "0.11", features = ["signal", "interpolate-linear", "interpolate"], optional = true }
2022-04-06 10:51:24 +08:00
rubato = { version = "0.12", optional = true }
2021-08-01 11:01:04 +08:00
samplerate = { version = "0.2", optional = true }
2026-09-10 16:00:58 +08:00
libsamplerate-sys = { version = "0.1.12", optional = true }
2023-05-11 12:04:38 +08:00
uuid = { version = "1.3", features = ["v4"] }
num_cpus = "1.15"
bytes = { version = "1.4", features = ["serde"] }
default-net = "0.14"
wol-rs = "1.0"
2023-11-01 17:04:32 +08:00
flutter_rust_bridge = { version = "=1.80", features = ["uuid"], optional = true}
errno = "0.3"
rdev = { git = "https://github.com/rustdesk-org/rdev" }
2023-05-11 12:04:38 +08:00
url = { version = "2.3", features = ["serde"] }
crossbeam-queue = "0.3"
hex = "0.4"
chrono = "0.4"
cidr-utils = "0.5"
2023-04-20 17:26:17 +08:00
fon = "0.6"
2023-11-24 16:40:18 +08:00
shutdown_hooks = "0.1"
2024-01-19 15:35:58 +08:00
totp-rs = { version = "5.4", default-features = false, features = ["gen_secret", "otpauth"] }
2025-06-12 21:32:28 +08:00
stunclient = "0.4"
2026-09-06 00:21:28 +08:00
kcp-sys= { git = "https://github.com/rustdesk-org/kcp-sys", branch = "rustdesk-patches" }
2026-07-30 15:28:39 +08:00
reqwest = { version = "0.12", features = ["blocking", "socks", "json", "native-tls", "rustls-tls", "rustls-tls-native-roots", "gzip", "zstd"], default-features=false }
[target.'cfg(not(target_os = "linux"))'.dependencies]
# https://github.com/rustdesk/rustdesk/discussions/10197, not use cpal on linux
2024-11-23 18:41:27 +08:00
cpal = { git = "https://github.com/rustdesk-org/cpal", branch = "osx-screencapturekit" }
2023-03-29 16:59:50 +08:00
ringbuf = "0.3"
2021-03-29 15:59:14 +08:00
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
mac_address = "1.1"
2024-12-20 22:24:53 +08:00
sciter-rs = { git = "https://github.com/rustdesk-org/rust-sciter", branch = "dyn" }
2023-05-11 12:04:38 +08:00
sys-locale = "0.3"
enigo = { path = "libs/enigo", features = [ "with_serde" ] }
2022-05-12 17:35:25 +08:00
clipboard = { path = "libs/clipboard" }
2021-08-12 01:25:32 +08:00
ctrlc = "3.2"
2025-04-30 23:49:18 +08:00
# arboard = { version = "3.4", features = ["wayland-data-control"] }
2024-07-28 17:26:54 +08:00
arboard = { git = "https://github.com/rustdesk-org/arboard", features = ["wayland-data-control"] }
2024-06-30 21:57:32 +08:00
clipboard-master = { git = "https://github.com/rustdesk-org/clipboard-master" }
portable-pty = { git = "https://github.com/rustdesk-org/wezterm", branch = "rustdesk/pty_based_0.8.1", package = "portable-pty" }
system_shutdown = "4.0"
2024-01-22 16:29:08 +08:00
qrcode-generator = "4.1"
2021-03-29 15:59:14 +08:00
[target.'cfg(target_os = "windows")'.dependencies]
2024-04-22 10:37:08 +08:00
winapi = { version = "0.3", features = [
"winuser",
"wincrypt",
"shellscalingapi",
"pdh",
"synchapi",
"memoryapi",
"shellapi",
"devguid",
"setupapi",
"cguid",
"cfgmgr32",
"ioapiset",
2025-03-27 15:34:27 +08:00
"winspool",
2024-04-22 10:37:08 +08:00
] }
2025-04-30 23:49:18 +08:00
windows = { version = "0.61", features = [
"Win32",
"Win32_Foundation",
"Win32_Security",
"Win32_Security_Authorization",
"Win32_Storage_FileSystem",
"Win32_System",
"Win32_System_Com",
"Win32_System_Diagnostics",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_Environment",
"Win32_System_IO",
"Win32_System_Memory",
"Win32_System_Pipes",
"Win32_System_Registry",
"Win32_System_SystemInformation",
"Win32_System_Threading",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
] }
2023-06-05 22:25:03 +08:00
winreg = "0.11"
2023-05-11 12:04:38 +08:00
windows-service = "0.6"
virtual_display = { path = "libs/virtual_display" }
2025-03-27 15:34:27 +08:00
remote_printer = { path = "libs/remote_printer" }
2024-07-31 17:25:10 +08:00
impersonate_system = { git = "https://github.com/rustdesk-org/impersonate-system" }
shared_memory = "0.12"
2025-04-30 23:49:18 +08:00
tauri-winrt-notification = "0.1"
2021-03-29 15:59:14 +08:00
[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2"
cocoa = "0.24"
dispatch = "0.2"
core-foundation = "0.9"
core-graphics = "0.22"
include_dir = "0.7"
fruitbasket = "0.10"
objc_id = "0.1"
2025-08-30 22:16:35 +08:00
# If we use piet "0.7" here, we must also update core-graphics to "0.24".
piet = "0.6"
piet-coregraphics = "0.6"
foreign-types = "0.3"
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
2026-03-14 15:54:54 +08:00
tray-icon = { git = "https://github.com/tauri-apps/tray-icon", version = "0.21.3" }
tao = { git = "https://github.com/rustdesk-org/tao", branch = "dev" }
2023-02-09 21:28:42 +08:00
image = "0.24"
2023-06-30 11:50:16 +08:00
[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
keepawake = { git = "https://github.com/rustdesk-org/keepawake-rs" }
2023-02-09 21:28:42 +08:00
2023-10-11 19:03:34 +08:00
[target.'cfg(any(target_os = "windows", target_os = "linux"))'.dependencies]
2024-07-31 17:25:10 +08:00
wallpaper = { git = "https://github.com/rustdesk-org/wallpaper.rs" }
2025-09-06 12:11:43 +08:00
tiny-skia = "0.11"
softbuffer = "0.4"
fontdb = "0.23"
bytemuck = "1.23"
ttf-parser = "0.25"
2023-10-11 19:03:34 +08:00
2021-03-29 15:59:14 +08:00
[target.'cfg(target_os = "linux")'.dependencies]
2026-01-21 20:43:15 +08:00
libxdo-sys = "0.11"
2023-05-11 12:04:38 +08:00
psimple = { package = "libpulse-simple-binding", version = "2.27" }
pulse = { package = "libpulse-binding", version = "2.27" }
2024-12-20 22:24:53 +08:00
rust-pulsectl = { git = "https://github.com/rustdesk-org/pulsectl" }
2023-05-11 12:04:38 +08:00
async-process = "1.7"
evdev = { git="https://github.com/rustdesk-org/evdev" }
2022-10-11 19:52:03 +08:00
dbus = "0.9"
dbus-crossroads = "0.5"
x11-clipboard = {git="https://github.com/clslaid/x11-clipboard", branch = "feat/store-batch", optional = true}
x11rb = {version = "0.12", features = ["all-extensions"], optional = true}
percent-encoding = {version = "2.3", optional = true}
once_cell = {version = "1.18", optional = true}
2024-09-19 18:47:37 +08:00
nix = { version = "0.29", features = ["term", "process"]}
gtk = "0.18"
termios = "0.3"
2025-07-17 08:46:32 +08:00
terminfo = "0.8"
2025-09-06 12:11:43 +08:00
winit = "0.30"
2022-08-02 03:47:29 -07:00
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
openssl = { version = "0.10", features = ["vendored"] }
2021-03-29 15:59:14 +08:00
[target.'cfg(target_os = "android")'.dependencies]
2023-05-11 12:04:38 +08:00
android_logger = "0.13"
2023-05-12 12:40:52 +08:00
jni = "0.21"
2024-07-31 17:25:10 +08:00
android-wakelock = { git = "https://github.com/rustdesk-org/android-wakelock" }
2021-03-29 15:59:14 +08:00
[workspace]
members = ["libs/scrap", "libs/hbb_common", "libs/base", "libs/enigo", "libs/clipboard", "libs/virtual_display", "libs/virtual_display/dylib", "libs/portable", "libs/remote_printer"]
exclude = ["vdi/host"]
2021-03-29 15:59:14 +08:00
2026-01-21 20:43:15 +08:00
# Patch libxdo-sys to use a stub implementation that doesn't require libxdo
# This allows building and running on systems without libxdo installed (e.g., Wayland-only)
[patch.crates-io]
libxdo-sys = { path = "libs/libxdo-sys-stub" }
# Upstream reserves a frame's whole declared length as soon as its header is in, so a header alone
# buys an allocation the size it names, bounded only by max_frame_size. This fork grows the read
# buffer one read_buffer_size chunk at a time as the bytes actually arrive. Patched rather than
# depended on directly, so tokio-tungstenite's own tungstenite resolves to the same copy.
tungstenite = { git = "https://github.com/rustdesk-org/tungstenite-rs", rev = "efce47e5364f00a63302cf07ab1fb13ded478914" }
2026-09-06 00:21:28 +08:00
# One branch off upstream v0.13.0, the tag whose crate versions match this stack.
# webrtc-util: reads the Windows adapter list's IPv6 addresses as host-order u16 groups, so every
# one comes out byte-swapped, fails to bind, and ICE gathers no IPv6 host candidate on Windows;
# and names every Windows adapter "" with no mask, so ICE cannot tell one adapter's addresses
# from another's; and lays the adapter struct out in nested parts, whose padding on x64 shifts
# every field after OperStatus, Ipv6IfIndex first.
# webrtc-ice: best effort, one IPv6 host candidate per interface and prefix - the one the OS
# sends from when that is one of the group's, else all of them - since the stable address beside
# the temporary one is an identifier that outlives every rotation and that nothing else this
# machine sends out ever shows.
2026-09-06 00:21:28 +08:00
# webrtc-sctp: RFC 4960's 1s RTO floor makes a single loss cost 1-3s on a link whose RTT is 24-64ms,
# and fast retransmit cannot cover a request/response exchange; INITIAL_MTU 1228 also fragments on
# IPv6; and its AIMD pins a lossy long-haul link to MSS/(RTT*sqrt(p)), so a switch sends without
# a congestion window, as KCP does - on by default, `allow-webrtc-congestion-control` opts back in.
# Sending that way, a reordering window keeps a chunk that is merely late from being resent on a
# path that jitters, every DATA chunk asks for its SACK at once so a lost tail is back within an
# RTT at KCP's RTO floors, and bundles of small chunks stay within the MTU. A T3-rtx resends
# everything outstanding when it packs into four packets and otherwise probes with one and lets
# the SACK settle the rest (F-RTO), timed from the latest send, so a stall no longer resends the
# whole backlog behind itself while a short lost tail still comes back at once. A DATA chunk
# received again is listed in the SACK, which never happened - the sender widens its reordering
# window on that - and the SACK keeps to the MTU too, the lowest gap blocks first.
2026-09-06 00:21:28 +08:00
# Pinned by rev, not branch: a fork branch can be rewritten out from under the lockfile.
# webrtc: SettingEngine cannot reach the ICE agent's max_binding_requests, which decides how
# long the answerer keeps checking a pair that has not answered yet.
webrtc = { git = "https://github.com/rustdesk-org/webrtc", rev = "49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63" }
webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63" }
webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63" }
2026-01-21 20:43:15 +08:00
2021-03-29 15:59:14 +08:00
[package.metadata.winres]
2026-06-30 11:02:28 +08:00
LegalCopyright = "Copyright © 2026 Purslane Tech Pte. Ltd. All rights reserved."
2024-03-07 17:00:32 +08:00
ProductName = "RustDesk"
2024-03-15 00:26:53 +08:00
FileDescription = "RustDesk Remote Desktop"
2024-03-04 22:19:18 +08:00
OriginalFilename = "rustdesk.exe"
2021-03-29 15:59:14 +08:00
[target.'cfg(target_os="windows")'.build-dependencies]
winres = "0.1"
winapi = { version = "0.3", features = [ "winnt", "pdh", "synchapi" ] }
2021-03-29 15:59:14 +08:00
[build-dependencies]
cc = "1.0"
hbb_common = { path = "libs/hbb_common" }
os-version = "0.2"
2021-03-29 15:59:14 +08:00
[dev-dependencies]
2022-09-17 11:26:30 +00:00
hound = "3.5"
2025-03-14 00:21:05 +08:00
docopt = "1.1"
2026-09-06 00:21:28 +08:00
tokio = { version = "1.44", features = ["test-util"] }
2021-03-29 15:59:14 +08:00
[package.metadata.bundle]
name = "RustDesk"
identifier = "com.carriez.rustdesk"
2022-09-18 11:22:30 +08:00
icon = ["res/32x32.png", "res/128x128.png", "res/128x128@2x.png"]
2021-03-29 15:59:14 +08:00
osx_minimum_system_version = "10.14"
#https://github.com/johnthagen/min-sized-rust
[profile.release]
2022-05-12 17:35:25 +08:00
lto = true
codegen-units = 1
panic = 'abort'
2022-05-24 19:37:01 +02:00
strip = true
2021-03-29 15:59:14 +08:00
#opt-level = 'z' # only have smaller size after strip
2022-12-08 19:59:37 +08:00
rpath = true
2026-04-21 17:34:05 +08:00
[profile.dev]
debug = 1