Get the code and build it

git clone https://github.com/scarletnx/ScarletNX.git
cd ScarletNX
cmake --preset default -B build -DBUILD_TESTING=ON && cmake --build build
ctest --test-dir build --output-on-failure

The first build downloads the third-party libraries once into .cache/cpm. Every build deploys the runtime into each game in the data folder (~/.local/share/scarletnx/recompiled/ on Linux), so do not build while a timing-sensitive test or game run is going.

The commands you will use most, from the table in CLAUDE.md:

TaskCommand
Extract a dumpbuild/scarletnx -x "Game.xci" --name Game
Recompile a gamebuild/scarletnx -r work/Game
Run a game unattendedcd ~/.local/share/scarletnx/recompiled/<id> && ./<id> --seconds=60 --shot=/path/out --script=...
Name addresses, disassemble one functiontools/symbols.py work/Game ADDR..., tools/disasm.py work/Game FUNC
All testsctest --test-dir build --output-on-failure
The QEMU differential test of the host's native back endctest --test-dir build -R native_qemu_differential
The module contract testctest --test-dir build -R module_contract

tools/run_game.py wraps an unattended run with scripted input and screenshots. The procedure is in .claude/skills/snx-run/SKILL.md.


Made from docs/layers/cpu/guide.md at 69237645142c. GPL-3.0-or-later.