This implementation mostly follows ob-C.el, which provides org-babel support for the C/C++/D languages.
It is also nice to have zig-mode installed for working with zig source:
git clone https://github.com/jolby/ob-zig.el.git
(add-to-list 'load-path "/home/path-to-where-you-checked-out-ob-zig/")
At this point, you should be able to interactively execute zig source blocks in org mode documents.
Here is an example of a zig code block within an org-mode document:
,#+source: simple ,#+begin_src zig :imports '(std) const stdout = std.io.getStdOut().writer(); try stdout.print("{s}", .{"hello"}); ,#+end_src
If you place the cursor somewhere within the above code block, and then press the key chord: =C-c C-c=, emacs will execute that zig source code and insert the result below:
: hello
Read the documentation of Org Babel for more examples of what you can do with source code blocks of many different languages.
(add-to-list 'load-path (expand-file-name "straight/repos/org/testing" doom-local-dir))
The file test-ob-zig-runner.el has some utility functions for setting up paths and running the ERT test suite. It should be sufficient to load that file and then call the interactive function: =M-x test-ob-zig-run-tests=.