Installation

This guide covers building the Uplift compiler from source.

Prerequisites

Installing Zig

Download Zig from ziglang.org/download or use your package manager:

# macOS (Homebrew)
brew install zig

# Fedora
sudo dnf install zig

# Ubuntu/Debian
snap install zig --classic

# Windows (Chocolatey)
choco install zig
zig version
# Should show 0.16.0 or later

Installing LLVM

# macOS (Homebrew)
brew install llvm@22

# Fedora
sudo dnf install llvm llvm-devel clang

# Ubuntu/Debian
apt install llvm-22 llvm-22-dev

# Windows (Chocolatey)
choco install llvm

# Windows (manual)
# Download from releases.llvm.org and install to C:\Program Files\LLVM
# Or set LLVM_PREFIX environment variable to your LLVM install path

Building Uplift

This procedure was only fully tested on macOS and Fedora Linux.

Create a directory that will become the uplift workspace, as example: `uplift-workspace`

This directory should be filled with the following sub-directories: `compiler`, `libraries`, `scripts`. Please `cd` into the `scripts` directory, and while inside the `scripts` directory execute this shell script:

./build_compiler.sh

If the compilation was successful there should be a `upc` executable file in the root of the `uplift-workspace`. This is the uplift compiler. Executing the following shell script makes the uplift compiler available from anywhere:

./create_shortcut.sh

The functionality of the compiler can be verified with:

upc version
# Uplift 0.7.2-dev

Windows Build Notes

Keep in mind: This procedure was never fully tested...

On Windows, use WSL, MSYS2, or any Bash-compatible shell to run the build and test scripts. Alternatively, you can build directly with Zig:

zig build

Known difference: When using upc run on Windows, args[0] shows the temp binary path rather than the source file path. Standalone binaries (upc build) are not affected.

Running Tests

./run-tests.sh

Next Steps