Prerequisites

Here's what you need before installing the Runtime

  1. XMake

Cocoa3DRuntime uses XMake as it's build system. Follow the build instructions here

Instructions

  1. Clone the repository

    git clone https://codeberg.org/solarconquestgame/Cocoa3DRuntime.git
    cd Cocoa3DRuntime
    

  2. Clone the vendor repositories

    cd vendor
    git clone https://github.com/luau-lang/luau.git
    git clone https://github.com/raysan5/raylib.git
    cd ..
    

  3. Build with XMake

    xmake
    

Troubleshooting

Having an issue with installing? See below!

Problem: error: target(luau-XXX): toolchain not found!

This means you're missing some build tools, refer to the section below to fix it

Linux

If you're on Linux, you're missing clang, GCC or build-essential... Rookie mistake.

For Debian distros including Ubuntu, pick a compiler;
- sudo apt install build-essential (recommended)
- sudo apt install clang (uncommon, but can work)

For Arch distros, pick a compiler;
- sudo pacman -S gcc (recommended)
- sudo pacman -S clang (uncommon, but can work)

For Fedora distros, simply run this command to install GCC, clang, and other common build tools
- sudo dnf groupinstall "Development Tools"

Once you're done, you're good to run xmake! Yay Linux!

Windows

Option 1: MSYS2 (Linux-like build tools)

MSYS2 is a collection of Linux tools and libraries provided to Windows users for building, installing, and running on Windows natively. Essentially same as build-essentials command in Linux where you'd get all of the needed tools such as GCC, CMake, etc. This is the preferred method as your skills and knowledges can be transferred to Linux easily should if you ever move to Linux from Windows.

  1. Go to https://www.msys2.org/ and click "msys2-x86_64-XXXX.exe" button. It should give you an installer.
  2. Proceed with the install.
  3. When installed, open MSYS2 terminal and run pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make.
  4. When they are all installed and compiled, close the terminal and open "Environment Variables".
  5. Go to "Edit the system environment variables".
  6. Finally, click "Environment Variables".
  7. Under "System variable" section, find "Path". If you see Path, click on it and click "Edit" button
  8. Click "New" and add C:\msys64\mingw64\bin to it. (If you installed "msys64" folder elsewhere, append to the path before "msys64"). When done, click OK.
  9. Back to the terminal where you got "toolchain not found" error is at, run xmake f --toolchain=mingw --mingw="C:/msys64/mingw64". If no issue appears, now run xmake to start build.

Option 2: Visual Studio Build Tools

Visual Studio Build Tools is Windows-only and made for the Visual Studio IDE. It supports everything Visual Studio offers including C++ support.

  1. Go to https://visualstudio.microsoft.com/downloads/ and scroll down until you see "Tools for Visual Studio", click to open it
  2. If you see "Build Tools for Visual Studio 2026", click "download" and you should get vs_BuildTools.exe. If you prefer 2022, you can grab Long-Term Support Build Tools from this: https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#release-dates-and-build-numbers (scroll a bit down and you will see "Evergreen bootstrapper" section. Click "Build Tools" in Current row.)
  3. During install, just check Desktop development with C++ and proceed with the install.
  4. When installed, rerun xmake and it should pick up the toolchain.