If you’re writing tooling you definitely want the binary format. You don’t have to parse it, you just load it into memory and it’s ready to go. std.Build.Configuration API has everything you need.
That’s a great point about getting the path to that file though. That should definitely be a zig build flag. Tracking issue: