- Project Overview
- Prerequisites
- macOS Setup
- Windows Setup
- Building the Project
- Troubleshooting
- Additional Resources
RustDesk is an open-source remote desktop application written in Rust with a Flutter-based UI for both desktop and mobile platforms.
| Component | Technology |
|---|---|
| Core Application | Rust |
| Desktop/Mobile UI | Flutter |
| Legacy UI (Deprecated) | Sciter |
| Video Codecs | libvpx, aom, libyuv |
| Audio Codec | Opus |
| Package Manager | vcpkg (C++ dependencies) |
Customdesk/
├── src/ # Main Rust application code
│ ├── server/ # Audio/clipboard/input/video services
│ ├── client.rs # Peer connection handling
│ ├── platform/ # Platform-specific code
│ └── ui/ # Legacy Sciter UI (deprecated)
├── flutter/ # Flutter UI for desktop & mobile
│ ├── lib/desktop/ # Desktop-specific Flutter code
│ ├── lib/mobile/ # Mobile-specific Flutter code
│ └── lib/common/ # Shared Flutter components
├── libs/ # Core Rust libraries
│ ├── hbb_common/ # Video codec, config, network utils
│ ├── scrap/ # Screen capture
│ ├── enigo/ # Keyboard/mouse control
│ └── clipboard/ # Cross-platform clipboard
├── res/ # Resources and build scripts
├── build.py # Main build script
└── Cargo.toml # Rust package manifest
- Rust 1.75 or later
- Flutter SDK ^3.1.0 or later
Before setting up the development environment, ensure you have:
- Git installed and configured
- Internet connection for downloading dependencies
- At least 20 GB of free disk space
- Administrator/sudo privileges
Open Terminal and run:
xcode-select --installIf prompted, click Install and agree to the license.
If not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Add Homebrew to PATH (for Apple Silicon Macs):
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"brew install cmake nasm yasm ninja llvm pkg-config wget curl zip unzipcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shSelect option 1 for default installation. Then reload the shell:
source "$HOME/.cargo/env"Verify installation:
rustc --version
cargo --versioncd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout 2023.04.15
./bootstrap-vcpkg.shSet the environment variable (add to ~/.zshrc or ~/.bashrc):
echo 'export VCPKG_ROOT="$HOME/vcpkg"' >> ~/.zshrc
echo 'export PATH="$VCPKG_ROOT:$PATH"' >> ~/.zshrc
source ~/.zshrccd $VCPKG_ROOT
./vcpkg install libvpx libyuv opus aomNote: This step may take 15-30 minutes depending on your system.
cd ~
git clone https://github.com/flutter/flutter.git -b stableAdd Flutter to PATH:
echo 'export PATH="$HOME/flutter/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcVerify and accept licenses:
flutter doctor
flutter doctor --android-licensesNote: This is optional if you're only building the Flutter version.
cd /path/to/Customdesk
mkdir -p target/debug
wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylib
mv libsciter.dylib target/debug/cd /path/to/Customdesk
git submodule update --init --recursiveInstall Flutter dependencies:
cd flutter
flutter pub get
cd ..# Check Rust
rustc --version
# Check vcpkg
echo $VCPKG_ROOT
# Check Flutter
flutter doctor
# Check cmake
cmake --versionDownload and install Visual Studio 2022 (Community Edition is free):
During installation, select:
- ☑️ Desktop development with C++
- ☑️ Windows 10/11 SDK (latest version)
- ☑️ MSVC v143 - VS 2022 C++ x64/x86 build tools
Download and install:
Use default installation options.
Download and run the Rust installer:
Open a new Command Prompt or PowerShell and verify:
rustc --version
cargo --versionInstall using winget (Windows Package Manager):
winget install Kitware.CMake
winget install NASM.NASM
winget install yasm.yasm
winget install Ninja-build.Ninja
winget install LLVM.LLVMOr download manually:
| Tool | Download Link |
|---|---|
| CMake | cmake.org/download |
| NASM | nasm.us |
| YASM | yasm.tortall.net |
| LLVM | releases.llvm.org |
Add tools to System PATH:
- Press
Win + R, typesysdm.cpl, press Enter - Go to Advanced → Environment Variables
- Under System variables, find
Pathand click Edit - Add paths to installed tools (e.g.,
C:\Program Files\CMake\bin)
Open PowerShell (as Administrator):
cd C:\
git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout 2023.04.15
.\bootstrap-vcpkg.batSet environment variable permanently:
[Environment]::SetEnvironmentVariable("VCPKG_ROOT", "C:\vcpkg", "User")Restart PowerShell, then verify:
echo $env:VCPKG_ROOTcd C:\vcpkg
.\vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-staticNote: This step may take 30-60 minutes.
Option A - Using Git:
cd C:\
git clone https://github.com/flutter/flutter.git -b stableOption B - Download ZIP from flutter.dev
Add Flutter to PATH:
- Press
Win + R, typesysdm.cpl, press Enter - Go to Advanced → Environment Variables
- Under User variables, find
Pathand click Edit - Add
C:\flutter\bin
Verify and accept licenses:
flutter doctor
flutter doctor --android-licensesNote: This is optional if you're only building the Flutter version.
cd C:\path\to\Customdesk
mkdir -p target\debug
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll" -OutFile "target\debug\sciter.dll"cd C:\path\to\Customdesk
git submodule update --init --recursiveInstall Flutter dependencies:
cd flutter
flutter pub get
cd ..# Check Rust
rustc --version
# Check vcpkg
echo $env:VCPKG_ROOT
# Check Flutter
flutter doctor
# Check cmake
cmake --version
# Check Visual Studio
where cl.exe| Build Type | Command |
|---|---|
| Debug (Sciter UI) | cargo run |
| Release (Sciter UI) | cargo build --release |
| Flutter Desktop | python3 build.py --flutter |
| Flutter Desktop (Release) | python3 build.py --flutter --release |
| Flutter with HW Codec | python3 build.py --flutter --hwcodec |
| VRAM Support (Windows) | python3 build.py --flutter --vram |
cd /path/to/Customdesk
VCPKG_ROOT=$HOME/vcpkg cargo runcd /path/to/Customdesk
python3 build.py --flutterFor release build:
python3 build.py --flutter --releasepython3 build.py --flutter --hwcodecOpen Developer Command Prompt for VS 2022 or PowerShell.
cd C:\path\to\Customdesk
$env:VCPKG_ROOT = "C:\vcpkg"
cargo runcd C:\path\to\Customdesk
python build.py --flutterFor release build:
python build.py --flutter --releasepython build.py --flutter --hwcodec --vram| Platform | Output Directory |
|---|---|
| macOS | flutter/build/macos/Build/Products/Release/ |
| Windows | flutter/build/windows/x64/runner/Release/ |
| Linux | flutter/build/linux/x64/release/bundle/ |
| Rust Binary | target/release/rustdesk (or rustdesk.exe) |
Error: Could not find package libvpx
Solution:
# macOS
cd $VCPKG_ROOT && ./vcpkg install libvpx libyuv opus aom
# Windows
cd $env:VCPKG_ROOT && .\vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-staticError: rustc 1.XX is too old
Solution:
rustup update stableError: [✗] Flutter
Solution:
flutter doctor -v
flutter upgradeError: Submodule 'xxx' not found
Solution:
git submodule update --init --recursiveError: link.exe not found
Solution:
- Open Visual Studio Installer
- Ensure Desktop development with C++ workload is installed
- Use Developer Command Prompt for VS 2022 instead of regular PowerShell
Error: dyld: Library not loaded: libsciter.dylib
Solution:
mkdir -p target/debug
wget -O target/debug/libsciter.dylib https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylibError: Permission denied
Solution:
chmod +x build.py
chmod +x flutter/build_*.sh| Variable | macOS | Windows |
|---|---|---|
VCPKG_ROOT |
$HOME/vcpkg |
C:\vcpkg |
PATH (Flutter) |
$HOME/flutter/bin |
C:\flutter\bin |
PATH (Rust) |
$HOME/.cargo/bin |
%USERPROFILE%\.cargo\bin |
- Discord: discord.gg/nDceKgxnkV
- GitHub Issues: github.com/rustdesk/rustdesk/issues
- FAQ: github.com/rustdesk/rustdesk/wiki/FAQ
| Feature | Description | Platform |
|---|---|---|
hwcodec |
Hardware video encoding/decoding | All |
vram |
VRAM optimization | Windows only |
flutter |
Enable Flutter UI | All |
screencapturekit |
ScreenCaptureKit support | macOS only |
unix-file-copy-paste |
File clipboard support | Unix |
# 1. Install dependencies
xcode-select --install
brew install cmake nasm yasm ninja llvm pkg-config wget
# 2. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
# 3. Install vcpkg
cd ~ && git clone https://github.com/microsoft/vcpkg && cd vcpkg
git checkout 2023.04.15 && ./bootstrap-vcpkg.sh
export VCPKG_ROOT="$HOME/vcpkg"
./vcpkg install libvpx libyuv opus aom
# 4. Install Flutter
cd ~ && git clone https://github.com/flutter/flutter.git -b stable
export PATH="$HOME/flutter/bin:$PATH"
# 5. Build
cd /path/to/Customdesk
git submodule update --init --recursive
python3 build.py --flutter# 1. Install Visual Studio with C++ workload
# 2. Install tools
winget install Kitware.CMake NASM.NASM Ninja-build.Ninja LLVM.LLVM
# 3. Install Rust (download rustup-init.exe from rust-lang.org)
# 4. Install vcpkg
cd C:\ && git clone https://github.com/microsoft/vcpkg && cd vcpkg
git checkout 2023.04.15 && .\bootstrap-vcpkg.bat
[Environment]::SetEnvironmentVariable("VCPKG_ROOT", "C:\vcpkg", "User")
.\vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static
# 5. Install Flutter
cd C:\ && git clone https://github.com/flutter/flutter.git -b stable
# Add C:\flutter\bin to PATH
# 6. Build
cd C:\path\to\Customdesk
git submodule update --init --recursive
python build.py --flutterDocument Version: 1.0
Last Updated: February 2026
RustDesk Version: 1.4.5