|
| 1 | +--- |
| 2 | +title: Installation |
| 3 | +description: Install Rustalink on Linux, macOS, or Windows with all required build dependencies. |
| 4 | +--- |
| 5 | + |
| 6 | +import { Tabs, TabItem } from "@astrojs/starlight/components"; |
| 7 | + |
| 8 | +Install Rustalink from source using the commands for your operating system. |
| 9 | + |
| 10 | +## System Setup |
| 11 | + |
| 12 | +<Tabs> |
| 13 | + <TabItem label="Linux (Ubuntu/Debian)"> |
| 14 | + ```bash |
| 15 | + # System dependencies used in CI builds |
| 16 | + sudo apt-get update |
| 17 | + sudo apt-get install -y \ |
| 18 | + cmake \ |
| 19 | + pkg-config \ |
| 20 | + libclang-dev \ |
| 21 | + clang \ |
| 22 | + git \ |
| 23 | + build-essential \ |
| 24 | + perl |
| 25 | + |
| 26 | + # Install Rust stable toolchain |
| 27 | + curl https://sh.rustup.rs -sSf | sh -s -- -y |
| 28 | + source "$HOME/.cargo/env" |
| 29 | + |
| 30 | + # Build Rustalink |
| 31 | + cargo build --release --locked |
| 32 | + ``` |
| 33 | + |
| 34 | + Optional cross-compile dependencies for Linux ARM64: |
| 35 | + |
| 36 | + ```bash |
| 37 | + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu |
| 38 | + rustup target add aarch64-unknown-linux-gnu |
| 39 | + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc |
| 40 | + cargo build --release --locked --target aarch64-unknown-linux-gnu |
| 41 | + ``` |
| 42 | + </TabItem> |
| 43 | + |
| 44 | + <TabItem label="macOS"> |
| 45 | + ```bash |
| 46 | + # Apple command-line tools |
| 47 | + xcode-select --install |
| 48 | + |
| 49 | + # Dependencies used in CI builds |
| 50 | + brew install cmake pkg-config |
| 51 | + |
| 52 | + # Install Rust stable toolchain |
| 53 | + curl https://sh.rustup.rs -sSf | sh -s -- -y |
| 54 | + source "$HOME/.cargo/env" |
| 55 | + |
| 56 | + # Build Rustalink |
| 57 | + cargo build --release --locked |
| 58 | + ``` |
| 59 | + |
| 60 | + Optional target setup for Apple Silicon / Intel cross-target builds: |
| 61 | + |
| 62 | + ```bash |
| 63 | + rustup target add x86_64-apple-darwin aarch64-apple-darwin |
| 64 | + ``` |
| 65 | + </TabItem> |
| 66 | + |
| 67 | + <TabItem label="Windows"> |
| 68 | + ```powershell |
| 69 | + # Install build tools and dependencies |
| 70 | + winget install --id Microsoft.VisualStudio.2022.BuildTools --exact --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" |
| 71 | + winget install --id Kitware.CMake --exact |
| 72 | + winget install --id Git.Git --exact |
| 73 | +
|
| 74 | + # Install Rust stable (MSVC) |
| 75 | + winget install --id Rustlang.Rustup --exact |
| 76 | + rustup default stable-x86_64-pc-windows-msvc |
| 77 | +
|
| 78 | + # Build Rustalink |
| 79 | + cargo build --release --locked |
| 80 | + ``` |
| 81 | + |
| 82 | + Optional Windows ARM64 target: |
| 83 | + |
| 84 | + ```powershell |
| 85 | + rustup target add aarch64-pc-windows-msvc |
| 86 | + cargo build --release --locked --target aarch64-pc-windows-msvc |
| 87 | + ``` |
| 88 | + </TabItem> |
| 89 | +</Tabs> |
| 90 | + |
| 91 | +## Next Steps |
| 92 | + |
| 93 | +1. Copy the sample config and adjust values for your environment. |
| 94 | +2. Start Rustalink with your preferred runtime method. |
| 95 | +3. See Docker and Pterodactyl pages if you prefer containerized deployment. |
0 commit comments