# Contributor handoff — rustdesk/rustdesk

> Canonical page: https://codevetter.com/unpack/rustdesk/agent-handoff

# Contributor handoff — rustdesk/rustdesk

Scanned commit c6a358afbe37c518689a6157a8e8cdbd645dcc5d (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Read AGENTS.md first — it is the authoritative style/scope contract (no unwrap, no nested tokio runtimes, minimal diffs, additive-only changes, import/comment/localization rules). Build requires the hbb_common submodule and system deps (vcpkg/pkg-config for vpx/opus/aom); the pinned Rust 1.75 toolchain and Flutter 3.24.5 matter. Safe edit boundaries: new code in feature modules or src/platform/*; dangerous: shared protocol/session files and anything touching pre-auth limits.
- AGENTS.md is the governing doc (CLAUDE.md just @-imports it): bans unwrap/expect outside tests & lock acquisition, bans nested runtimes/block_on in async, bans locks across .await, mandates single-braced use blocks per crate, and requires a 'regression-surface' report for every change. — [AGENTS.md](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/AGENTS.md) [CLAUDE.md](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/CLAUDE.md)
- First files to read for any session work: src/core_main.rs (entry/CLI), src/server.rs + src/server/connection.rs (host), src/client.rs + src/client/io_loop.rs (controller), src/ipc.rs (inter-process Data enum), libs/base/src/config/keys.rs (all option names). — [src/core_main.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/core_main.rs) [src/server/connection.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/connection.rs) [src/client.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/client.rs) [src/ipc.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ipc.rs)
- Toolchain pins: rust-version 1.75 (Cargo.toml), CI RUST_VERSION 1.75 / macOS 1.81, Flutter 3.24.5 (3.44.9 win-arm64), flutter_rust_bridge '=1.80'/1.80.1 — mismatched frb versions regenerate incompatible bindings. — [Cargo.toml#L9](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/Cargo.toml#L9) [Cargo.toml#L77](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/Cargo.toml#L77) [flutter/pubspec.yaml](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/flutter/pubspec.yaml) [.github/workflows/flutter-build.yml#L15-30](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/flutter-build.yml#L15-L30)
- Build commands: `cargo build --locked --features flutter` (desktop lib) or `python3 build.py` for full app packaging; quick checks: `cargo test --locked --lib --features drm` (Linux), `flutter test` in flutter/; vcpkg must provide libvpx/libyuv/opus/aom per Dockerfile. — [.github/workflows/flutter-build.yml#L555](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/flutter-build.yml#L555) [.github/workflows/flutter-build.yml#L2080-2087](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/flutter-build.yml#L2080-L2087) [Dockerfile#L36-38](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/Dockerfile#L36-L38)
- Editing `libs/hbb_common` costs a round-trip: it is shared with rustdesk-server — put client-only code in libs/base instead; base::config::keys re-exports the hbb_common keys so callers never import from two places. — [AGENTS.md](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/AGENTS.md) [libs/base/src/config/keys.rs#L1-7](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/libs/base/src/config/keys.rs#L1-L7)
- Known traps: `is_quick_support_exe` must stay in sync with libs/portable/src/main.rs; the CLI↔IPC routing list is_user_main_ipc_scope_cli_command has a regression test; IPC FileBlockFromCM requires message-then-send_raw ordering; tray icon assets are include_bytes!()'d from res/ (compile-time). — [src/core_main.rs#L952-959](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/core_main.rs#L952-L959) [src/core_main.rs#L916-950](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/core_main.rs#L916-L950) [src/ipc.rs#L411-435](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ipc.rs#L411-L435) [src/tray.rs#L43-51](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/tray.rs#L43-L51)
- Process model trap: the same binary runs as service/root (--server), user GUI, tray, and --cm simultaneously; shared state does NOT cross processes — it goes through ipc::Data or Config file sync (sync_and_watch_config_dir); never assume a global static is visible to the other process. — [src/server.rs#L689-723](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server.rs#L689-L723) [src/ipc.rs#L321-438](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ipc.rs#L321-L438)
- Security-sensitive zones to touch carefully: pre-auth limits in connection.rs/rendezvous_mediator.rs (64/16/128KiB/180s/32-punch/16-answerer constants), ipc/auth.rs peer verification, updater.rs update paths, custom_server.rs signature verification — changes here need the 'regression surface' analysis AGENTS.md demands. — [src/server/connection.rs#L78-141](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/connection.rs#L78-L141) [src/ipc/auth.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ipc/auth.rs) [src/updater.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/updater.rs)
- Flutter-side session ownership: Session<T:InvokeUiSession> + LoginConfigHandler (ui_session_interface.rs) is the shared abstraction — Flutter implements it via FlutterHandler/event streams, legacy Sciter via remote::SciterHandler; new UI behavior should be added to the InvokeUiSession trait rather than bypassing it. — [src/ui_session_interface.rs#L57-75](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ui_session_interface.rs#L57-L75) [src/ui_session_interface.rs#L1679](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ui_session_interface.rs#L1679) [src/ui.rs#L32-35](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ui.rs#L32-L35)
- cfg discipline: almost every module is gated per-OS/feature; `#[cfg(not(any(target_os="android",target_os="ios")))]` is the desktop idiom, `feature="flutter"` selects the UI backend, and imports must be folded into per-crate braced blocks with separate use only for differently-gated items. — [src/lib.rs#L1-75](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/lib.rs#L1-L75) [AGENTS.md](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/AGENTS.md)
- Testing expectation: add #[cfg(test)] mods or files next to the code (video_qos/tests pattern); CI only runs named filters on Linux and one flutter test file — a renamed test silently stops running because empty filters exit 0 (noted in workflow comments). — [.github/workflows/flutter-build.yml#L2058-2087](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/flutter-build.yml#L2058-L2087) [src/server/video_qos/tests/smoke.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/video_qos/tests/smoke.rs)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
