Build From Source
This guide explains how to build the Rux compiler from source with CMake, Ninja, and Clang. It works on every platform Rux supports, including platforms without a prebuilt package.
Supported Platforms
- BSD
- Illumos
- Linux
- macOS
- Windows
Requirements
Rux is built with Clang C++ compiler. We recommend the latest stable release of each tool:
- Clang 22.1 or later
- CMake 4.3 or later
- Ninja 1.13 or later
- Git 2.54 or later
Install the Build Tools
Install Clang, CMake, Ninja, and Git for your platform:
sudo pacman -S clang cmake ninja git
pkg install llvm cmake ninja git
sudo apt install clang cmake ninja-build git
sudo dnf install clang cmake ninja-build git
brew install llvm cmake ninja git
sudo apt install clang cmake ninja-build git
scoop install llvm cmake ninja git
clang is Apple Clang. To build with Homebrew's LLVM instead, prepend it to your PATH — export PATH="$(brew --prefix llvm)/bin:$PATH" — before configuring.Clone the Repository
The Rux compiler has two branches:
- main — the most stable release of the compiler
- dev — the latest community updates; may be unstable
git clone https://github.com/rux-lang/rux
cd rux
git clone -b dev https://github.com/rux-lang/rux rux-dev
cd rux-dev
Configure and Build
Configure the project with the Ninja generator and Clang, then build:
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build
cmake --build build
The compiled rux binary is written to the build directory.
Add the Binary to Your PATH
cp build/rux ~/.local/bin/
# Open Environment Variables and add the build directory to your global Path,
# or copy rux.exe into a directory that is already on your PATH.
On Unix-like systems, make sure ~/.local/bin is on your PATH, adding it in your shell's profile if needed.
Verify the Installation
rux version
You should see the installed Rux compiler version.
Releases
All Rux releases are available on GitHub.
Windows
This guide explains how to install the Rux compiler on Windows, either with the MSI installer or using Scoop, a command-line package manager for Windows.
Visual Studio Code
Visual Studio Code is the recommended editor for Rux. The official Rux Language extension adds syntax highlighting for .rux source files.