Introduction

ninja-files is a collection of rust functions to make writing build.ninja files easy to accomplish in rust. This allows rust crates and modules to be used to provide "meta-build" functionality, then leaning on ninja to provide build functionality.

Ninja itself is fast, and able to only rebuild when needed, much like make, but supports more functionality. However, ninja explicitly does not support wildcards, and other forms of file discovery. This makes it difficult to use directly.

Other build tools support outputting to ninja, such as cmake, however you need to learn the cmake or other build tool syntax.

This project lets you use programming language to 'build your own' generator. This way you can think in normal programming concepts, e.g walk this directory. In fact, as there is excellent rust crates for this, you can just pull them in and use them.

Contributing

ninja-files is free and open source. The code is hosted on sourcehut, and patches are welcome to the mailing list.

ninja-files is not just aiming to be the components, but also a mono-repo in which lots of useful functions are stored. This encourages the re-useability, so the effort spent writing rules for a particular program can be re-used