Prerequisites
Here's what you need before installing the Runtime
- XMake
Cocoa3DRuntime uses XMake as it's build system. Follow the build instructions here
Instructions
-
Clone the repository
git clone https://codeberg.org/solarconquestgame/Cocoa3DRuntime.git cd Cocoa3DRuntime -
Clone the vendor repositories
cd vendor git clone https://github.com/luau-lang/luau.git git clone https://github.com/raysan5/raylib.git cd .. -
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.
- Go to https://www.msys2.org/ and click "msys2-x86_64-XXXX.exe" button. It should give you an installer.
- Proceed with the install.
- When installed, open MSYS2 terminal and run pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make.
- When they are all installed and compiled, close the terminal and open "Environment Variables".
- Go to "Edit the system environment variables".
- Finally, click "Environment Variables".
- Under "System variable" section, find "Path". If you see Path, click on it and click "Edit" button
- Click "New" and add
C:\msys64\mingw64\binto it. (If you installed "msys64" folder elsewhere, append to the path before "msys64"). When done, click OK. - 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.
- Go to https://visualstudio.microsoft.com/downloads/ and scroll down until you see "Tools for Visual Studio", click to open it
- 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.)
- During install, just check Desktop development with C++ and proceed with the install.
- When installed, rerun
xmakeand it should pick up the toolchain.