Skip to main content

Installation

This guide walks through installing the ReXGlue SDK and configuring your development environment for static recompilation of Xbox 360 executables.

System Requirements

Minimum Requirements:
  • Windows 10/11 (x64)
  • Clang 18 or newer
  • CMake 3.25+
  • Ninja build system
  • Visual Studio 2022 (for Windows SDK)
Graphics:
  • DirectX 12 capable GPU
  • Latest graphics drivers
Architecture Requirement: ReXGlue requires x64 architecture. 32-bit systems and ARM are not supported.
Compiler Requirement: ReXGlue requires Clang 18+ and will not compile with GCC or MSVC. The build system enforces this requirement.

Step 1: Install Prerequisites

Install Clang and Build Tools

  1. Install LLVM/Clang 18+:
    • Download from LLVM releases
    • Add to PATH: C:\Program Files\LLVM\bin
  2. Install CMake:
    • Download from cmake.org
    • Or via chocolatey: choco install cmake
  3. Install Ninja:
    choco install ninja
    
  4. Install Visual Studio 2022:
    • Required for Windows SDK headers
    • Select “Desktop development with C++” workload

Verify Installation

clang --version   # Should show 18.0.0 or newer
cmake --version   # Should show 3.25 or newer
ninja --version

Step 2: Download ReXGlue SDK

You can either download a pre-built release or build from source.

Download from GitHub Releases

  1. Visit ReXGlue SDK Releases
  2. Download the latest release for your platform:
    • rexglue-sdk-win-amd64-vX.X.X.zip (Windows)
    • rexglue-sdk-linux-amd64-vX.X.X.tar.gz (Linux)
  3. Extract to your preferred location:
# Windows (PowerShell)
Expand-Archive rexglue-sdk-win-amd64-v0.2.2.zip -DestinationPath C:\rexglue-sdk

# Linux
tar -xzf rexglue-sdk-linux-amd64-v0.2.2.tar.gz -C ~/rexglue-sdk
  1. Add the SDK binaries to your PATH:
# Windows (add to environment variables)
setx PATH "%PATH%;C:\rexglue-sdk\bin"

# Linux (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/rexglue-sdk/bin:$PATH"
Pre-built releases include the rexglue CLI tool and runtime libraries ready to use.

Step 3: Verify Installation

Test that the ReXGlue CLI tool is working:
rexglue --help
You should see output similar to:
ReXGlue - Xbox 360 Recompilation Toolkit

Usage: rexglue <command> [flags] [args]

Commands:
  codegen <config.toml>   Analyze XEX and generate C++ code
  init                    Initialize a new project
  migrate                 Migrate project to current SDK version
  recompile-tests         Generate Catch2 tests from PPC assembly

Run 'rexglue --help' for flag details.
Location: src/rexglue/main.cpp:44-53

Step 4: Configure Graphics Backend

The SDK supports multiple graphics backends depending on your platform.
Direct3D 12 is the default backend on Windows.Enabled automatically via CMake option: REXGLUE_USE_D3D12=ONRequirements:
  • Windows 10/11 with DirectX 12
  • D3D12-capable GPU (most GPUs from 2015+)
No additional configuration needed.

Optional: Enable Build Features

Build with Tests

Enable unit tests and PPC instruction tests:
cmake -DREXGLUE_BUILD_TESTS=ON --preset <your-preset>
cmake --build out/build/<preset-name>

# Run tests
ctest --test-dir out/build/<preset-name>

Enable Sanitizers (Debug)

Enable undefined behavior sanitizer for debugging:
cmake -DREXGLUE_ENABLE_SANITIZERS=ON --preset <debug-preset>
Address Sanitizer (ASan) is not compatible with ReXGlue’s memory mapping at 0x100000000. Only UndefinedBehaviorSanitizer (UBSan) is supported.
Location: CMakeLists.txt:96-101

Project Integration Methods

Once installed, you can use the SDK in your projects in two ways: Include the SDK source tree in your project:
# In your CMakeLists.txt
set(REXSDK_DIR "${CMAKE_SOURCE_DIR}/thirdparty/rexglue-sdk" CACHE PATH "")
add_subdirectory("${REXSDK_DIR}" rexglue-sdk)

target_link_libraries(my_game PRIVATE rex::core rex::system)

Method 2: Use Installed Package

If you installed the SDK to a system location:
find_package(rexglue REQUIRED CONFIG)
target_link_libraries(my_game PRIVATE rex::core rex::system)

Troubleshooting

Explicitly set the compiler:
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ --preset <preset>
On Linux with specific version:
cmake -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 --preset <preset>
The SDK enforces Clang compiler. Verify:
clang --version
Ensure it shows Clang 18.0.0 or newer. Set compiler explicitly in CMake.Location: CMakeLists.txt:39-46
Check that you haven’t disabled both graphics backends:
# On Windows, enable D3D12 (default)
cmake -DREXGLUE_USE_D3D12=ON --preset win-amd64-release

# On Linux, enable Vulkan (default)
cmake -DREXGLUE_USE_VULKAN=ON --preset linux-amd64-release
Location: CMakeLists.txt:28-30
Install validation layers:
# Ubuntu/Debian
sudo apt install vulkan-validationlayers-dev

# Arch
sudo pacman -S vulkan-validation-layers

Next Steps

Quick Start Guide

Create your first recompiled project with rexglue init

Architecture Overview

Learn about the recompilation system architecture

Build docs developers (and LLMs) love