Ninja Build System
ninja-build.org
4
Leaving SiteNav
External Link Disclaimer
You are about to visit ninja-build.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Ninja is a small build system with a focus on speed, designed to be used as a backend for higher-level build system generators like CMake, Meson, or GN. Created by Evan Martin at Google in 2010 for the Chromium browser build (which previously took over 40 minutes to build with Make), Ninja dramatically reduced build times through aggressive parallelization and dependency graph optimization. Unlike Make or CMake which process complex build configuration files at build time, Ninja uses a simple, low-level build file format (build.ninja) that is typically generated by a higher-level tool, allowing Ninja to focus entirely on fast execution. Key features include: minimal build file format (each rule defines a command, and each build edge specifies inputs, outputs, and the rule to apply), aggressive parallel build execution (Ninja can spawn hundreds of parallel compilation jobs, limited only by available CPU cores), intelligent rebuild scheduling based on file modification times and content hashing, edge-level dependency tracking (knowing exactly which files depend on which, enabling minimal rebuilds when a single header changes), variable scoping and rule expansion, subtooling support (Ninja subninja includes), phony build targets for grouping, browse mode (generating dependency graph visualization in Chromium browser), integration with compilation databases (compile_commands.json for IDE integration), and support for restat rules (checking if an output file actually changed before marking dependents for rebuild). Ninja is written in C++ and has no external dependencies. As of 2026, Ninja is the default backend for CMake, Meson, Fuchsia OS builds, and Chromium.
Statistics
4
Views
0
Clicks
0
Like
0
Dislike