#Correct way to generate larger amounts of code at build time?

1 messages · Page 1 of 1 (latest)

supple solar
#

Title. I'm aware of addWriteFile but this takes a slice of bytes, so should I have it depend on a step that allocates the output? Is there any other way of doing this generally

subtle onyx
#

create a self contained tool that takes input, and configures output from the command line, then you can run that through the build system. Bonus points for doing it in zig :P

you can add file/directory inputs/outputs to things run by the build system, and they will be automagically cached for you.

#

see std.Build.addSystemCommand/addRunArtifact

#

as well as std.Build.Step.Run, which is the result of the above functions