C++23, Metal and ARM64 field guides
Three companion booklets for building a real-time engine on Apple silicon. Each is typeset with worked listings and diagrams, and each says plainly what was run and what was only checked.
The C++23 field guide
Modern C++ from structs, classes, templates and containers through to move semantics, ranges and concurrency, with a long, slow chapter on pointers, plus a section on where inline arm64 assembly and NEON actually help.
Download the PDFThe graphics field guide: C++23 and Metal 4
The path from vertices to pixels: the Metal 4 command model, shaders, textures, compute and ray tracing, and the maths behind them. Figures are rendered by the guide's own CPU code. A closing section covers where arm64 and NEON matter on the CPU side.
Download the PDFThe arm64 assembly field guide
Registers, instructions, memory, flags, the stack and calling convention, floating point and NEON, and how to read compiler output, written for Apple silicon.
Download the PDFSources and verification
The arm64 listings were assembled with clang for the arm64-apple-macos target, and their behaviour was checked in an A64 interpreter written for the purpose. Nothing was run on ARM hardware. In the C++ and graphics guides, the NEON and inline-assembly branches were compile-checked for arm64 only; their logic was tested through a stand-in header on another CPU, and no speed was measured. The Metal host code was type-checked against Apple's headers but never run on a GPU, and the ray-tracing, texture and stage shaders were not compiled. Details specific to Metal 4.1 and macOS 27 are hedged where they appear.