1 unstable release

0.1.0 Jun 3, 2023

#14 in #ninja-build


Used in ninja-files

MIT license

52KB
1.5K SLoC

Ninja Files

This is a collection of rust modules to help build.ninja files. This allows you to use rust to generate ninja build files, offers more functionality than just cargo.

https://ninja-build.org/manual.html

This is also general enough for all project kinds, not just rust. It allows rust to be used as the 'meta-build' system for the ninja build system

Project Structure

The project is structured as a mono repo, with a meta package that pulls in common items that can be enabled with features.

data - is the core data types and builders to create files cookie - is a file writer written using the cookie-factory crate.

Other folders in lib are various 'modules' that will be published as crates. These can be picked and chosen for your project, so you only pull in what you need to

Contributing

Having extra 'modules' for people to consume is greatly encouraged. It is the hope that many useful modules will be mono-repo'd into this repository, so that everyone can benefit.

It is still also possible to publish your own packages under your own names.

Examples

The util/configure is an real world example, it generates the build.ninja file for this project. To initially seed the file run ./configure in the root directory to generate the ninja file.

An awesome feature of ninja, is it can be configure that the build.ninja file has dependencies on the util/configure project, so it will automatically be regenerated if the configure project is updated.

Dependencies

~0.6–0.9MB
~12K SLoC