Installation
Install Rustalink from source using the commands for your operating system.
System Setup
Section titled “System Setup”# System dependencies used in CI buildssudo apt-get updatesudo apt-get install -y \ cmake \ pkg-config \ libclang-dev \ clang \ git \ build-essential \ perl
# Install Rust stable toolchaincurl https://sh.rustup.rs -sSf | sh -s -- -ysource "$HOME/.cargo/env"
# Build Rustalinkcargo build --release --lockedOptional cross-compile dependencies for Linux ARM64:
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnurustup target add aarch64-unknown-linux-gnuexport CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcccargo build --release --locked --target aarch64-unknown-linux-gnu# Apple command-line toolsxcode-select --install
# Dependencies used in CI buildsbrew install cmake pkg-config
# Install Rust stable toolchaincurl https://sh.rustup.rs -sSf | sh -s -- -ysource "$HOME/.cargo/env"
# Build Rustalinkcargo build --release --lockedOptional target setup for Apple Silicon / Intel cross-target builds:
rustup target add x86_64-apple-darwin aarch64-apple-darwin1. Install required tools
Section titled “1. Install required tools”Install dependencies using winget:
winget install --id Git.Git --exactwinget install --id Kitware.CMake --exactwinget install --id Rustlang.Rustup --exactwinget install --id Microsoft.VisualStudio.2022.BuildTools --exact2. Install C++ build tools (required for Rust MSVC)
Section titled “2. Install C++ build tools (required for Rust MSVC)”Rust on Windows uses the MSVC toolchain, which requires the Microsoft C++ compiler and linker (link.exe).
Open Visual Studio Installer from the Start Menu.
Locate Build Tools for Visual Studio 2022.
Click Modify.
Select the workload:
Desktop development with C++
Ensure the following components are checked:
- MSVC v143 - VS 2022 C++ x64/x86 build tools
- Windows 10/11 SDK
These provide:
cl.exe(MSVC compiler)link.exe(required by Rust)- Windows headers and libraries
Without these components, builds will fail with:
error: linker `link.exe` not found3. Fix CMake policy compatibility (CMake 4.x)
Section titled “3. Fix CMake policy compatibility (CMake 4.x)”Recent versions of CMake 4.x removed compatibility with very old policy versions used by some crates.
Set this environment variable once to avoid build failures from dependencies such as audiopus_sys:
setx CMAKE_POLICY_VERSION_MINIMUM 3.5Restart your terminal after running this command.
4. Install Rust toolchain
Section titled “4. Install Rust toolchain”rustup default stable-x86_64-pc-windows-msvcVerify installation:
rustc --versioncargo --version5. Build Rustalink
Section titled “5. Build Rustalink”cargo build --release --lockedOptional Windows ARM64 target:
rustup target add aarch64-pc-windows-msvccargo build --release --locked --target aarch64-pc-windows-msvcNext Steps
Section titled “Next Steps”- Copy the sample config and adjust values for your environment.
- Start Rustalink with your preferred runtime method.
- See Docker and Pterodactyl pages if you prefer containerized deployment.