Introduction
Fabricate is a Lua-configured build system that produces Ninja build files. The
fabricate CLI evaluates your fab.lua configuration, downloads declared git
dependencies, records build graph information, and writes an output/build.ninja
file (and optionally a compile_commands.json). After fabricate setup runs you
invoke Ninja to actually build your project.
This guide documents how to use Fabricate: the CLI options, how to structure a
fab.lua, and the helper functions and object types that Fabricate makes
available to Lua. Development internals, contributing guidelines, and other
non-user topics are intentionally omitted.
Getting Started
- Install the
fabricatebinary (Cargocargo install fabricate2if you are building from source, or copy the compiled binary into your$PATH). - Create a working directory that contains a
fab.luaconfiguration file. All paths referenced by the configuration are interpreted relative to this directory. - Run
fabricate setupto generate the build directory. This will create the Ninja build file, compile commands, a fabricate cache file, ... - Build either with Ninja directly or using Fabricates wrapper. The default build directory is
build.
4.1. with Ninja:ninja -C <build dir>.
4.2. with Fabricate:fabricate --build-dir <build dir>. - Finally install artifacts with
fabricate install.