https://github.com/roc-lang/basic-webserver/pull/236
This is just an experiment to see if zig build were possible.
I know we have all the tests in Python still, so that would be a lot of migration.
We will probably swap out our scripts to Roc before we use Zig for acripting. We have avoided using Roc on the main repos pre 0.1 just to avoid the problem of stability and breaking changes making upgrades painful.
I've switched roc-pandoc over already as a bit of a pilot project https://github.com/lukewilliamboswell/roc-pandoc/tree/main/scripts
My plan is to replace the scripts for all my repos one at a time and help validate the basic-cli API etc before we commit to the core Roc ones.
There is some experimentation here around what does scripting look like in Roc -- and I've tried a few different things already.
That sense makes to me. I wonder zig build buys anything in coordination, even if just to match the roc compiler build. I thought heard it was designed to be a good build tool even for non zig code, but I don't have actual experience in that.
I have used both Zig and Roc for build scripts and I may be a little biased here ... but I think Roc is definitely more suited to this use case :wink:
Zig is probably more mature, though it is also still changing between versions.
Using Roc like this is a good way to help us validate our designs and get real world experience.
That sense makes to me. I wonder zig build buys anything in coordination, even if just to match the roc compiler build. I thought heard it was designed to be a good build tool even for non zig code, but I don't have actual experience in that.
Non-Zig code usually means C and C++, since Zig can compile these itself, without external tools (zig cc). And Zig has builtin caching for C and C++ compilation, which gcc/clang does not have. So a Zig build system brings much benefit for building C projects. However, for Roc, the Zig build system would still need to call an external compiler (roc), which uses its own caching, so there's not much benefit to using it.
I think these are different demands in terms of scripting, for building with anything C/C++ related I would use Zig.
But afaik Roc tries to replace python scripts.
I using right now posix shell scripts for really small stuff and janet for a little bit bigger scripts, could have a look at janet to get inspiration.
Last updated: Oct 15 2026 at 17:56 UTC