Don't understand how to cache step output

FYI, custom build steps are going away.

However, you may not need custom steps for this, even with 0.16.0. Here’s an example where the godot commands will still be run every time, but the output files will be cached so e.g. the translate c result will be cached.

// Directory to use as the CWD for the dump commands
const godot_temp_output = b.addWriteFiles();

// Directory to copy the output into, so that we get integration with the cache system.
const godot_output = b.addWriteFiles();
const generated_h = godot_output.addCopyFile(
    godot_temp_output.getDirectory().path(b, "gdextension_interface.h"),
    "gdextension_interface.h",
);

const run_godot_dump = b.addSystemCommand(&.{ "godot", "--dump-gdextension-interface" });
run_godot_dump.setCwd(godot_temp_output.getDirectory());
godot_output.step.dependOn(&run_godot_dump.step);

// generated_h can be used with addTranslateC, etc