A cross-built driver extracts too: hactool is part of it. The tools the build runs (sailgen and the other
generators) are built for the build machine, with its C compiler (SNX_HOST_CC).
Host tools only, without SDL/Vulkan/FFmpeg or Python:
cmake --preset default -B build/tools -DSNX_TOOLS_ONLY=ON -DBUILD_TESTING=ON && cmake --build build/tools
build/tools/scarletnx -r -h
ctest --test-dir build/tools --output-on-failure
The recompiler makes game code with the host's native back end: x86-64's, arm64's, or one of the RISC machines'
(sailgen). Modules are built for the machine that builds them, with its instruction set
extensions (build == host == target); nothing is detected at run time. Whole functions are batched into units of 90000
instructions (20000 on Android; --chunk), with a progress line per compiled unit.
Extraction needs nothing beside the driver: hactool runs inside it. Recompilation deploys the
running full runtime; the tools-only build creates one in its checkout's build/native-recomp, or accepts
--runtime FILE. A build tree's programs work in the same data folder as an installed copy's: the user's
(~/.local/share/scarletnx, %APPDATA%\scarletnx on Windows), and on Linux the XDG config, state and cache folders
hold its settings, logs and caches (Usage). --data DIR before the command names another data
folder, --build-dir DIR another build tree.
The menu (SNX_BUILD_GUI) needs Python 3 to build its languages (scripts/build-languages.py,
GUI). Python ≥3.12 is optional for tools/*.py diagnostics.
Made from docs/dev/build.md at 69237645142c. GPL-3.0-or-later.