Skip to content

rux-lang/Rux

Rux Logo

Rux Programming Language

BSD Illumos Linux macOS Windows Release License

GitHub stars GitHub followers GitHub forks Discussion Discord Reddit YouTube X Bluesky Mastodon Telegram


Rux is a fast, compiled, strongly typed, multi-paradigm programming language.

Project Status

Currently, under development.

Documentation

Building from Source

Rux is written in modern C++26, so it needs an up-to-date toolchain. If you are new to building C/C++ projects, just follow the steps for your operating system top to bottom — every command can be copied and pasted.

Prerequisites

You need the following tools, all in a recent version:

Tool Version Description
Clang 21.1+ The C++26 compiler
CMake 4.2+ Generates the build files
Ninja 1.13+ Runs the actual build, fast
Git 2.52+ Downloads the source code

Note GCC and MSVC will be supported later — please build with Clang.

1. Get the source

git clone https://github.com/rux-lang/Rux.git
cd Rux

2. Install the toolchain and configure

Expand the section for your operating system. Each one installs the tools and then runs CMake to prepare a build directory.

DragonFly BSD
sudo pkg install -y llvm cmake ninja git

cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
FreeBSD
sudo pkg install -y llvm22 cmake ninja git

cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++22
macOS

Apple's built-in Clang lags behind and lacks full C++26 support, so install the latest LLVM with Homebrew:

brew install llvm cmake ninja git

cmake -S . -B build -G Ninja \
  -DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++"
NetBSD
sudo pkgin -y install clang cmake ninja-build git

cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
OmniOS
pfexec pkg install clang cmake ninja git

cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
OpenBSD
doas pkg_add llvm%22 cmake ninja git

cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
Ubuntu / Debian
# Clang (latest) from the official LLVM apt repository
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 22                 # installs clang++-22

# CMake (latest) and Ninja
sudo snap install cmake --classic
sudo apt install -y ninja-build git

cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++-22
Windows
  1. Install Visual Studio 2026 (the free Community edition is fine) with the "Desktop development with C++" workload. This provides the Windows SDK and C runtime that Clang links against.

  2. Install the latest Clang, CMake, and Ninja with Scoop. If you don't have Scoop yet, install it from a regular (non-admin) PowerShell:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

    Then install the tools (all from Scoop's main bucket):

    scoop install llvm cmake ninja
  3. Open the "x64 Native Tools Command Prompt for VS 2026" from the Start menu. This sets up the Windows SDK and C runtime environment that Clang needs to compile and link.

    Prefer your own terminal? Any PowerShell window works too — just initialize the build environment once per session first:

    $vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
    & "$vs\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64 -HostArch amd64
  4. Configure the build:

    cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++

Tip Depending on how Clang is packaged, the compiler may be named clang++ or carry a version suffix such as clang++-22 or clang++22. Use whichever name your system installed in the -DCMAKE_CXX_COMPILER= argument above.

3. Compile

cmake --build build --config Release

The compiled rux binary is written to the Bin/Release directory (Bin/Release/rux, or Bin\Release\rux.exe on Windows).

4. Verify

Run the binary to confirm it works:

./Bin/Release/rux help          # on Windows: .\Bin\Release\rux.exe help

To use rux from anywhere, copy it to a directory on your PATH (for example /usr/local/bin on Unix-like systems), or add the Bin/Release directory to your PATH.

Community

Here’s how you can get involved.

Contributing

The Rux repository is hosted at rux-lang/Rux on GitHub.

Read the Contributing guide to get started.

License

MIT

About

Compiler for Rux programming language

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Contributors

Languages