macOS

Apple silicon only, with Xcode's Clang. The preset is macos, and the Linux presets and default do not apply. Install Xcode, then the build tools:

xcode-select --install
brew install cmake ninja meson
  1. Configure and build:

    cmake --preset macos
    cmake --build --preset macos
    # -> build/macos/{scarletnx,snx-shaderc}

    build/macos/scarletnx runs from the terminal as on Linux (Usage). It loads the system's Vulkan loader, so it needs Homebrew's molten-vk and vulkan-loader.

  2. The app (optional), for a double-clickable ScarletNX.app that carries its own MoltenVK:

    cmake build/macos -DSNX_MOLTENVK=<moltenvk>
    cpack --config build/macos/CPackConfig.cmake -B out   # out/ScarletNX-macos-arm64.zip

    <moltenvk> is the extracted MoltenVK-macos.tar of the Ryujinx MoltenVK release that .github/workflows/build.yml pins (MOLTENVK_RELEASE, with its SHA-256). Do not leave it out. Without it the app has no MoltenVK, and on a Mac without Homebrew's it stops at startup with SDL could not open a Vulkan window: Failed to load Vulkan Portability library. A game's folder gets the library beside its copy of the runtime (snx_deploy_runtime), which is what the game's own process loads.

CI's macOS and iOS (arm64) job builds the app on every push, and its zip, ScarletNX-macos-arm64-<commit>.zip, already has MoltenVK. The app is signed ad hoc, so a downloaded copy may need Open from the Finder's menu the first time (xattr -cr ScarletNX.app clears the quarantine). More on the frontend, the data folder, iOS and what is missing in macOS and iOS.

-DSNX_KOSMICKRISP=<sdk>/macOS also carries Mesa's KosmicKrisp and its Vulkan loader, from a LunarG Vulkan SDK's macOS folder. vulkan_driver=auto, the default, then plays KosmicKrisp on a Mac that runs it (Apple silicon, macOS 26 or later), and the MoltenVK the app carries elsewhere (macOS and iOS).


Made from docs/dev/build.md at 69237645142c. GPL-3.0-or-later.