Shinobi: A Ninja build to Zig build translator

Shinobi


Hello everyone, I’d like to introduce shinobi, a library for translating Ninja’s ‘build.ninja’ files into the Zig build system. The goal of this project is to make it easier to compile C/C++ libraries through Zig’s build system for easier integration into Zig projects. This should help reduce the need to maintain a Zig build script for the C/C++ library.

Currently, shinobi comes as both a single ‘shinobi.zig’ file or as a precompiled binary that can generate ‘build.zig’ files. An initial version v0.1.0 has been released. This project has only been tested on Windows and Linux.

The repository comes with an example of how this can be used within a project’s ‘build.zig’ script. This library has also had minimal testing with the ‘glfw3’ and ‘bgfx’ projects.

Let me know if you have any comments, suggestions or if you run into any issues.

Supported Zig versions

0.17.1

4 Likes

Interesting. Would be nice to have such a tool for the waf build system as well.