Files
hello-agent/Cargo.toml
T
mike 6bdf1058fa
build-windows / build-hello-agent-x64 (push) Successful in 5m2s
build-windows / sign-hello-agent-x64 (push) Successful in 5s
build-windows / validate-hello-agent-x64 (push) Successful in 6s
Implement remote execution
2026-05-22 14:18:25 +02:00

69 lines
2.9 KiB
TOML

[package]
name = "hello-agent"
version = "0.1.5"
edition = "2021"
rust-version = "1.75"
description = "Headless RustDesk-protocol-compatible support agent for Windows"
publish = false
[[bin]]
name = "hello-agent"
path = "src/main.rs"
# The full RustDesk protocol stack is vendored under `vendor/rustdesk/`.
# We consume it as a path dependency on the `librustdesk` crate (the rlib
# crate-type in its Cargo.toml's [lib] section is what makes this work).
#
# We deliberately turn off rustdesk's `flutter` feature: we don't ship the
# Flutter UI. We keep `hwcodec` for parity with the upstream Windows build
# and `vram` for hardware-accelerated encoding paths.
[dependencies]
# The vendored rustdesk crate's [package] name is "rustdesk" but its [lib]
# name is "librustdesk". `package = "rustdesk"` aliases it so we can keep
# `use librustdesk::…` in source.
librustdesk = { package = "rustdesk", path = "vendor/rustdesk", default-features = false, features = ["use_dasp", "hwcodec", "vram"] }
hbb_common = { path = "vendor/rustdesk/libs/hbb_common" }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "io-util", "process"] }
log = "0.4"
env_logger = "0.10"
anyhow = "1"
# Used by `inventory.rs` to validate the PowerShell-produced JSON before
# we stamp it into the sysinfo upload. hbb_common already pulls serde_json
# transitively, so this is a free re-export — listed explicitly here so
# the inventory module's `use serde_json` doesn't depend on internal
# implementation details of hbb_common.
serde_json = "1"
[target.'cfg(target_os = "windows")'.dependencies]
windows-service = "0.6"
winapi = { version = "0.3", features = ["winuser", "wtsapi32", "processthreadsapi", "synchapi", "handleapi", "winbase", "wlanapi", "wlantypes"] }
winreg = "0.11"
# Embed the icon and EXE metadata via the Windows resource compiler.
# Same crate (and version) the vendored rustdesk uses for its own icon —
# keeping them in lockstep avoids a duplicate `winres` in Cargo.lock.
#
# Unconditional rather than target-gated: build.rs runs on the *host* and
# decides via `CARGO_CFG_TARGET_OS` whether the target is Windows. A
# host-conditional build-dep would hide winres on a Linux/macOS host even
# when cross-compiling to Windows.
[build-dependencies]
winres = "0.1"
# Match upstream's release profile so the resulting binary has the same
# stripping / LTO behavior. Diverging here would surprise CI.
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true
# Mirror the [patch.crates-io] from the vendored rustdesk Cargo.toml. Cargo
# only honors [patch] at the *outermost* workspace root, so we have to
# repeat it here. (The Linux-only libxdo-sys-stub avoids requiring libxdo
# on the build host; on Windows it's conditionally compiled out anyway, but
# keeping the patch makes a future Linux build configuration easier.)
[patch.crates-io]
libxdo-sys = { path = "vendor/rustdesk/libs/libxdo-sys-stub" }