Ninja
Ninja is a free build system focused on evaluating incremental builds quickly.
What Ninja is
Ninja is a free build system focused on evaluating incremental builds quickly. It reads file interdependencies and runs the commands needed to build targets. It is designed to work with a separate program that generates its input files; GN and CMake can generate Ninja files, and the manual also names Premake as a possible fit. Builds run in parallel by default, using the number of CPUs on the system. Ninja can discover additional dependencies at build time, including C and C++ header dependencies from compiler-generated information. Official binaries are available for Linux, Mac, and Windows, and package-manager installation is documented. The project identifies Apache-2.0 as its license and describes Ninja as a standalone executable without a public API. Ninja has no built-in rules, such as rules for compiling C code, and its input files are not especially convenient to write by hand. It also lacks build-time decision-making features such as conditionals. The project site identifies v1.13.1, released 10 July 2025, as its last release.
Good
- Free to use under Apache-2.0
- Runs builds in parallel by default
- Can discover C and C++ header dependencies
- Prebuilt binaries are available for Linux, Mac, and Windows
Watch out
- Requires a separate program to generate input files
- Has no built-in build rules
- Offers no conditionals or build-time decision-making features
Who it suits
Ninja suits developers using a separate build-system generator who want fast incremental builds. It is available for Linux, Mac, and Windows.
Verdict
Ninja focuses on quickly executing generated build instructions, with parallel builds and dependency discovery. Its lack of built-in rules and limited hand-written configuration make the choice of a generating tool important.
Plans and prices
From Ninja's own pricing page, checked 11 Oct 2001.
| Plan | Price | What it gives you |
|---|---|---|
| Ninja | Free | Small build system focused on speed · downloadable binary or build from source |
The facts
Each one read from Ninja's own pages, with the date it was checked.
What it does
- Build behavior
- Builds run in parallel by default, using the number of CPUs on the system.checked 11 Oct 2001
- Dependencies
- Ninja supports discovering extra dependencies at build time, including C and C++ header dependencies.checked 11 Oct 2001
- Dependency handling
- Ninja supports discovering C/C++ header dependencies from compiler-generated dependency information.checked 11 Oct 2001
- Designed use
- Ninja is intended to work with a separate program that generates its input files.checked 11 Oct 2001
- Download
- Official prebuilt binaries are available for Linux, Mac, and Windows, and the project also documents installation through package managers.checked 11 Oct 2001
- Downloads
- The project README says binaries are available for Linux, Mac, and Windows.checked 11 Oct 2001
- Generated inputs
- Ninja is designed for a higher-level build system to generate its input files, which are human-readable but not especially convenient to write by hand.checked 11 Oct 2001
- How it works
- Ninja takes file interdependencies as input and runs the commands needed to build targets.checked 11 Oct 2001
- Incremental builds
- Ninja aims for very fast incremental builds, including for very large projects.checked 11 Oct 2001
- Integrations
- GN and CMake can generate Ninja files; the manual also names Premake as a possible fit.checked 11 Oct 2001
- License
- The project repository identifies its license as Apache-2.0.checked 11 Oct 2001
- Notable limit
- Ninja has no built-in rules, such as rules for compiling C code.checked 11 Oct 2001
- Notable limits
- Ninja has no built-in rules, little syntax for hand-written build files, and no build-time customization or decision-making features such as conditionals.checked 11 Oct 2001
- Parallel builds
- Builds run in parallel by default, based on the number of CPUs on the system.checked 11 Oct 2001
- Purpose
- Ninja is a small build system designed to evaluate incremental builds quickly.checked 11 Oct 2001
- Release
- The project site identifies v1.13.1, released 10 July 2025, as the last Ninja release.checked 11 Oct 2001
- Standalone executable
- The project README describes Ninja as a standalone executable rather than a library, with no public API.checked 11 Oct 2001
- Support
- The project site links to a mailing list and lists the #ninja-build IRC channel on irc.oftc.net.checked 11 Oct 2001
- Use cases
- The site says Ninja is used to build Google Chrome, parts of Android, and LLVM.checked 11 Oct 2001
Where it runs
- Platforms
- The manual says Ninja works on Unix-like systems and Windows, and runs on Mac OS X and FreeBSD.checked 11 Oct 2001
- Platform support
- The manual says Ninja works on Unix-like systems and Windows, and runs on Mac OS X and FreeBSD; it has seen the most testing on Linux.checked 11 Oct 2001
Alternatives to Ninja
- 1

AWS CodeBuild
Free planWebAPILinuxmacOS7.9From $0.01 a month - 2

fastlane
Free planAndroidiOSLinuxmacOS7.4Free plan - 3

Nx
Free planWebLinuxmacOSSelf-hosted7.2From $29 a month - 4

Bazel
Free planLinuxmacOSWindows6.7Free plan - 5

FASTBuild
Free planLinuxmacOSWindows6.6Free plan - 6
Open Build Service
Free planWebAPILinuxSelf-hosted6.6Free plan
