Drafted with AI assistance from my own notes and code, then edited and fact-checked by me.
To run the ray tracer on three platforms, Gram Build had to do more than pick a compiler. It needed three build modes with different jobs: Debug for development, Release for the game's own tools, and Final for a clean standalone run. It also needed the right compiler for each system.
I wanted one IDE project that could hold both the engine's C++ and Rust code. Along the way, I typed a zero where the O belonged in one optimization setting, and Xcode couldn't find Cargo because it hadn't inherited Terminal's command path.
The final test was on a Legion Go S running SteamOS. The game built and ran there too. The fan had its own review of the Debug build.
The reason I tackled the build first was the ray tracer itself. It was the next engine project that needed to run beyond my Mac. Until then, Gram Build had only one Debug build. If I wanted to test the same renderer on Windows and Linux, the engine needed a build path that could travel with it.
I gave the three builds different jobs. Debug kept the editor, logs and validation close while I worked. Release was optimized but kept the game's own test panels. Final ran without the editor and validation layers, like a clean standalone game. On Windows, it also opened without a console. Each mode had a different job in the same project.
The compiler choice had to match the system too. I used Apple clang on the Mac, MSVC for a native Windows build, and GCC on Linux. From the Mac, MinGW could cross-compile for Windows. I kept the choice explicit: if I asked for MSVC and it was missing, Gram should tell me rather than quietly substituting another compiler. On the Mac, I could test that decision without having MSVC installed.
One typo showed how easily a successful build can hide missing work. I meant the letter O in the link-time optimization setting, but wrote LT0 with a zero. The build still finished. Cargo ignored the misspelled setting without a message, so it looked as if the optimization had been enabled. My first tests repeated the same typo because they copied the values from the code. I rewrote them to check the rule instead. A test should catch a mistake, not inherit it.
The IDE project was the next bridge. The engine had C++ at its core and Rust for gameplay. I wanted both visible in one project, with a way to rebuild the Rust part and let the running game pick it up. The project tree could show files that were not compiled as C++, so I could navigate the whole engine without pretending it was one language.
The first Xcode failure looked unhelpful. It worked from Terminal, but Xcode started from Finder and could not find Cargo. It had not inherited Terminal's command-search folders. Once Gram passed that environment into the generated project, Xcode could start the build. There was still a practical split: Xcode handled C++, while I attached VS Code for Rust debugging. Visual Studio could set Rust breakpoints directly.
Windows brought a different obstacle. Visual Studio would not build a target while its debugger was running. The rebuild moved into the editor instead. Play rebuilt the gameplay library in the background and reloaded it when ready. Pause stopped the systems. Stop restored the saved world. Those buttons kept the test loop moving without stopping the debugger for every change.
The last platform was a Legion Go S running SteamOS. I first thought I could sideload the game like an Android app, but SteamOS was Linux, not Android, and its official Devkit client would not install on my Mac. I connected over SSH and used an Ubuntu container on the handheld to build the project. It ran on the Legion's AMD GPU. The useful result was that the same project built on a Mac, a Windows machine and a Linux handheld.
Gram Build did not replace the tools it brought together. It learned enough to make one engine project build in different places, so I could get back to the part I actually wanted to test: the ray tracer. Read the full story in Episode 1.5 on petretiberiu.dev.

