Use b.build_root.handle to get a std.fs.Dir to the root of your project, open the directory of your resources via this will let you use the iterate() function to get a directory iterator.
b.addSystemCommand is your friend
use addInputFileArg too, otherwise zig won’t rebuild when the inputs change.
note both of those functions are on the step returned
Byb.addSystemCommand
use b.addOptions() to get a *Options, this lets you declaratively make a module, much nicer and more useful than a WriteFile
works like this options.addOption(T, "option_name", value)
then add it to your root module with addOptions("import_name", options)
and you will be able to @import("import_name").option_name to your heart’s content :3