#Is it possible to run a custom step decided at runtime in another custom step in build.zig?

1 messages · Page 1 of 1 (latest)

slim vault
#

I want to have a step which reads a config file from the filesystem and based on that decide which other step to run. Maybe I am overcomplicating this and instead I should just call functions, but I wanted to know if this was possible.
Let's say I have a Zig project which is an operating system, which has support for multiple bootloaders, architectures, boot protocols and emulators. For each combination of them (when compatible), I have a run step and a debug step. The run step launches the emulator. The debug step, for example in the case of QEMU, launches QEMU and GDB in two separate processes. As I already have those steps, I was wondering if could call another step based on this config file or otherwise I just have to call the function instead, which might be cleaner.

#

What I merely want is to avoid to recompile build.zig everytime I want to change the default run and debug steps