Skip to content
⌘K

Ninja

a small build system with a focus on speed.

health 44contrib 6613k

Overview & architecture

C++ standard
–
Build systems
cmake
License
Apache-2.0
Languages
C++
Last release
v1.13.2 · Nov 20, 2025

Repository activity

snapshot Nov 23, 2026
GitHub stars
latest
13k▲ 87
Merged PRs (30d)
latest
4▲ 4
Contributors (90d)
latest
9▲ 8
Issue first response p50
–
No snapshots yet.
312 open issues133 open PRs8 commits (30d)0 good first issues16 help wanted

Recent notable activity

  • Release
    Ninja v1.13.2

    Fix Ninja exit code when interrupted (issue #2681) #2690

    jhassev1.13.2
  • Release
    Ninja v1.13.1

    Bugfixes: Fix LINK : fatal error LNK1104: cannot open file on Windows in some cases #2616 Compatibility with older distros for Linux ARM version #2619 Restore "multiple rules generate" error with dyndep #2621

    jhassev1.13.1
  • Release
    Ninja v1.13.0

    Ninja now automatically joins a GNU Make jobserver as a client (version 4.4 on non-Windows systems required for "fifo" style) #1139 Print exit code of failed subcommands #1507 New tool ninja -t compdb-targets like compdb, but takes a list of targets instead of rules #1544 Support for ANSI (color) escape codes in…

    jhassev1.13.0
  • Release
    Ninja v1.12.1

    Bugfixes: Screen updates extremely slow on Windows #2435 Dry run error if the build directory does not exist #2431 New critical path scheduler performance improvements #2443

    jhassev1.12.1
  • Release
    Ninja v1.12.0

    Critical path scheduler which orders the jobs by their runtime history #2177 This may break your build if you haven't specified your dependencies correctly. Resiliency against inputs changing during the build #1943 Reliable ETA and progress percentage in status #1963 Support for path lengths over 260 characters on…

    jhassev1.12.0
  • Release
    Ninja v1.11.1

    This is a hotfix release for a SIGFPE on Linux: #2173

    jhassev1.11.1
  • Release
    Ninja v1.11.0

    See for the release notes.

    jhassev1.11.0
  • Release
    Ninja v1.10.2

    See for the release notes.

    jhassev1.10.2
  • Release
    Ninja v1.10.1

    See for the v1.10.1 release notes.

    jhassev1.10.1
  • Release
    Ninja v1.10.0

    See for the v1.10.0 release notes.

    jhassev1.10.0

Maintainers & organizations

every claim links to its source

Maintainers

No maintainers recorded yet.

Top contributors

Releases & changelog

  • Ninja v1.13.2

    Fix Ninja exit code when interrupted (issue #2681) #2690

  • Ninja v1.13.1

    Bugfixes: Fix LINK : fatal error LNK1104: cannot open file on Windows in some cases #2616 Compatibility with older distros for Linux ARM version #2619 Restore "multiple rules generate" error with dyndep #2621

  • Ninja v1.13.0major

    Ninja now automatically joins a GNU Make jobserver as a client (version 4.4 on non-Windows systems required for "fifo" style) #1139 Print exit code of failed subcommands #1507 New tool ninja -t compdb-targets like compdb, but takes a list of targets instead of rules #1544 Support for ANSI (color) escape codes in…

  • Ninja v1.12.1

    Bugfixes: Screen updates extremely slow on Windows #2435 Dry run error if the build directory does not exist #2431 New critical path scheduler performance improvements #2443

  • Ninja v1.12.0major

    Critical path scheduler which orders the jobs by their runtime history #2177 This may break your build if you haven't specified your dependencies correctly. Resiliency against inputs changing during the build #1943 Reliable ETA and progress percentage in status #1963 Support for path lengths over 260 characters on…

  • Ninja v1.11.1

    This is a hotfix release for a SIGFPE on Linux: #2173

  • Ninja v1.11.0major

    See for the release notes.

  • Ninja v1.10.2

    See for the release notes.

  • Ninja v1.10.1

    See for the v1.10.1 release notes.

  • Ninja v1.10.0major

    See for the v1.10.0 release notes.

Contribution opportunities

0 published

No published opportunities

Cards are published only for real, open, unassigned issues with maintainer engagement.
11 more candidates below the publish threshold
Help wantedstaleMatches your profileBuild Systems

ninja hanging with zombie child process

Occasionally, ninja is hanging after running a long-running build step, with a zombie child process present: $ ps ax grep ninja 32692 pts/1 S+ 0:00 ninja -C build/GccReleaseASan/ $ pstree 32692 -p ninja(32692)───sh(32702) $ gdb -p 32702 [...] Attaching to process 32702 warning: process 32702 is a zombie - the process has already terminated $ gdb -p 32692 [...] 0x00007f2839c2ed39 in __GI_ppoll (fds=0x1813c60, nfds=1, timeout= , sigmask=0x1807b40) at ../sysdeps/unix/sysv/linux/ppoll.c:51 51 result = INLINE_SYSCALL (ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8); (gdb) bt #0…

56score
build-systemslinux
  • Demand 25% × 0.49 = 127 reactions, 4 comments
  • Technical fit 30% × 0.61 = 18Ninja is in Language & Toolchain (a focus area); issue needs linux, which you listed
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 45%
  • Feasibility 20% × 0.90 = 18newcomer label; clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
  • #2052 ninja hanging with zombie child processissue
    Occasionally, ninja is hanging after running a long-running build step, with a zombie child process present: $ ps ax grep ninja 32692 pts/1 S+ 0:00 ninja -C build/GccReleaseASan/ $ pstree 32692 -p ninja(32692)───sh(32702) $ gdb -p 32702 [...] Attaching to process 32702 warning…
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 5d ago
Help wanteduntouchedstaleMatches your profileBuild Systems

Make `target^` a first-class citizen

From the manual: There is also a special syntax target^ for specifying a target as the first output of some rule containing the source you put in the command line, if one exists. For example, if you specify target as foo.c^ then foo.o will get built (assuming you have those targets in your build files). Can you please make these special foo.c^ targets behave as regular targets in all ninja commands by simply "dereferencing" them first? For example, while building foo.c^ works, this breaks: $ ninja -t clean foo.c^ Cleaning... ninja: error: unknown target 'foo.c^' 0 files.

42score
build-systemsdocs
  • Demand 25% × 0.17 = 41 reactions, 1 comments
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 45%
  • Feasibility 20% × 0.90 = 18newcomer label; clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
  • #2382 Make `target^` a first-class citizenissue
    From the manual: There is also a special syntax target^ for specifying a target as the first output of some rule containing the source you put in the command line, if one exists. For example, if you specify target as foo.c^ then foo.o will get built (assuming you have those…
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 29d ago
Help wanteduntouchedstaleMatches your profileBuild Systems

Non-deterministic continuous integration failure

Traceback (most recent call last): File "./misc/output_test.py", line 83, in test_issue_1214 AssertionError: '[0/1] echo a\x1b[K' != '[1/1] echo a\x1b[K\n\x1b[31mred\x1b[0m\n' [0/1] echo a [1/1] echo a red As seen here:

38score
  • Demand 25% × 0.00 = 00 reactions, 1 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 45%
  • Feasibility 20% × 0.90 = 18newcomer label; clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 5d ago
Help wantedstaleMatches your profileBuild Systems

Environment variable with a hyphen is dropped in ubuntu

Feel free to close this as invalid, the bug is likely not in ninja, as it looks like ninja simply does a posix_spawn to launch a process without modifying the environment. Though interestingly I could not reproduce the issue without ninja (tried my own wrapper that does posix_spawn etc), so opening it here as someone else might have experienced the same issue. populate buid.ninja with rule environ command = env build env.txt: environ Run ninja with command: env - FOO_bar=1 FOO_baz-baz=2 ninja Expected output from env should include both FOO_bar and FOO_baz-baz variables, but on some systems…

38score
build-systems
  • Demand 25% × 0.00 = 00 reactions, 3 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 45%
  • Feasibility 20% × 0.90 = 18newcomer label; clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 5d ago
Help wantedstaleMatches your profileBuild Systems

ninja_test fails for WrongOutputInDepfileCausesRebuild and Recompact, for a specific user on AIX

Hi Team, I'm trying to build ninja 1.10.2 on AIX(ppc) the build succeeded, but I see ninja_test is failing with the below errors, but when the tests are run individually they are passing. [USR1@aixhost::ninja-1.10.2] $ ./ninja_test --gtest_filter=-SubprocessTest.InterruptChild [309/342] BuildTest.WrongOutputInDepfileCausesRebuild * Failure in src/build_test.cc:574 build_res [342/342] BuildLogRecompactTest.Recompact failed Individual run [USR1@aixhost:ninja-1.10.2] $ ./ninja_test --gtest_filter=BuildTest.WrongOutputInDepfileCausesRebuild [1/1] BuildTest.WrongOutputInDepfileCausesRebuild passed…

38score
build-systemstesting
  • Demand 25% × 0.00 = 00 reactions, 4 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 45%
  • Feasibility 20% × 0.90 = 18newcomer label; clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
Suggested first step

Reproduce the bug on the latest main branch of Ninja, reduce it to a minimal example, and post your findings on the issue before opening a PR.

Rule-generated · updated 5d ago
Help wantedcandidateMatches your profileBuild Systems

Move Wiki into doc/ folder in repo

Due to spam, the Wiki is becoming unmaintainable. GitHub FIX THIS! Why can NEW users just delete a whole page? Or add links to their crypto scams? ALSO: Why aren't all commits automatically reverted as soon as the users get banned? Let's make my life easier and move everything into a doc/ folder. If someone wants to edit it, he has to make a PR. It is what it is. Thank GitHub. Rant over.

37score
docs
  • Demand 25% × 0.23 = 61 reactions, 3 comments
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; filed by a maintainer; project responsiveness 44%
  • Feasibility 20% × 0.60 = 12newcomer label; clear scope; project onboarding 50%
Evidence
  • #2843 Move Wiki into doc/ folder in repoissue
    Due to spam, the Wiki is becoming unmaintainable. GitHub FIX THIS! Why can NEW users just delete a whole page? Or add links to their crypto scams? ALSO: Why aren't all commits automatically reverted as soon as the users get banned? Let's make my life easier and move everything…
Suggested first step

Read the code the issue refers to, draft the documentation change, and open a small PR that references the issue.

Rule-generated · updated 3d ago
Help wantedstaleMatches your profileBuild Systems

"Installing files" step always numbered one too low on stdout (i.e. step [N/N] never shown)

I presume this is a ninja issue. If it's somehow meson's fault, I'll reopen it over there. Using build.ninja generated by meson, I always get output like the following: [1/5] Generating blah.gresource_c with a custom command. [2/5] Compiling C object blah.gresource@sta/blah.gresource.c.obj. [3/5] Linking static target libblah.gresource.a. [4/5] Linking target blah.exe. [4/5] Installing files. That is: Step 5 is never shown, and the "Installing files" step is always numbered one lower than it should be, duplicating the step number of the step above it. ninja 1.8.2 meson 0.42.1 MSYS2/MINGW64 on…

35score
build-systemscompilers
  • Demand 25% × 0.00 = 00 reactions, 5 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.20 = 5comments not checked; labelled (triaged)
  • Feasibility 20% × 0.90 = 18newcomer label; clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 26d ago
Help wanteduntouchedstaleMatches your profileBuild Systems

Add testing and documentation for `-k` and `-l` flags

These 2 flags are not mentioned in the Manual page (though they are listed when --help is used, which may be sufficient as-is), and are not tested in the test suite. I have rough ideas for, and am willing to make a PR (or separate PRs) to fix these issues, which in turn will also fix issue #630.

35score
docstesting
  • Demand 25% × 0.13 = 31 reactions, 0 comments
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 45%
  • Feasibility 20% × 0.60 = 12newcomer label; clear scope; project onboarding 50%
Evidence
  • #2757 Add testing and documentation for `-k` and `-l` flagsissue
    These 2 flags are not mentioned in the Manual page (though they are listed when --help is used, which may be sufficient as-is), and are not tested in the test suite. I have rough ideas for, and am willing to make a PR (or separate PRs) to fix these issues, which in turn will…
Suggested first step

Read the code the issue refers to, draft the documentation change, and open a small PR that references the issue.

Rule-generated · updated Oct 18, 2026
Help wantedcandidateMatches your profileBuild Systems

Ninja -t browse leaves socket open

Running ninja -t browse X then pressing Ctrl-C leaves the socket open. Rerunning ninja -t browse X causes a socket error. NInja should either catch the ctrl-c and terminate python (the parent process), or support a ninja -t browsestop tool. Note : I'm currently running 6a73d41072bafe2384aea20252c3faa6c1ceaa2a

32score
build-systemsnetworking
  • Demand 25% × 0.00 = 00 reactions, 3 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.31 = 8comments not checked; labelled (triaged); project responsiveness 44%
  • Feasibility 20% × 0.60 = 12newcomer label; clear scope; project onboarding 50%
Evidence
  • #465 Ninja -t browse leaves socket openissue
    Running ninja -t browse X then pressing Ctrl-C leaves the socket open. Rerunning ninja -t browse X causes a socket error. NInja should either catch the ctrl-c and terminate python (the parent process), or support a ninja -t browsestop tool. Note : I'm currently running…
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 3d ago
LabelleduntouchedstaleMatches your profileBuild Systems

Warn when phony rules mention variables

Not sure if this is a feature or a bug, but it wasn't what I was expecting. In the code below, the "-myflag" flag is ignored, and doesn't get added to the main build. Perhaps this is a feature, as otherwise the "pmain" target would create a different output to the "main" target, but it would have the same filename & path. If this is the case, please could you add the explanation to the docs? ninja rule link command = gcc -o $out $in $linkflags build main: link main.o build pmain: phony main linkflags = -myflag

26score
build-systemsdocs
  • Demand 25% × 0.00 = 00 reactions, 2 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.11 = 3comments not checked; project responsiveness 46%
  • Feasibility 20% × 0.55 = 11clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
  • #395 Warn when phony rules mention variablesissue
    Not sure if this is a feature or a bug, but it wasn't what I was expecting. In the code below, the "-myflag" flag is ignored, and doesn't get added to the main build. Perhaps this is a feature, as otherwise the "pmain" target would create a different output to the "main"…
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 18d ago
LabelledstaleMatches your profileBuild Systems

Ninja doesn't accept some charaters in variable names (eg. +)

Ninja gives a lexing error if I create a build rule with a + in it. This causes difficulty as I'm trying to create a c++0x variant of my build and I have to adjust the target name for ninja Can you extend the character set allowed in variable names?

20score
build-systems
  • Demand 25% × 0.00 = 00 reactions, 3 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12Ninja is in Language & Toolchain (a focus area)
  • Maintainer engagement 25% × 0.11 = 3comments not checked; project responsiveness 46%
  • Feasibility 20% × 0.25 = 5clear scope; project onboarding 50%
Evidence
Suggested first step

Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.

Rule-generated · updated 18d ago

Why this score

Health 44Contribution friendliness 66computed 19h ago
  • Activity0.53
    4 merged PRs in 30 days (full marks at 20); 8 commits in 30 days (full marks at 60)health
  • Onboarding0.50
    has mainstream build (CMake/Bazel/Meson), CI; missing contributing guide, docs sitecontrib
  • Entry points1.00
    12 open, unassigned good-first-issue/help-wanted issues without a PR (full marks at 10)contrib
  • Maintainer responsiveness0.44
    median PR merge time 381 h (full marks within 72 h, zero after 60 days)healthcontrib
  • Release cadence0.20
    last release 367 days ago (full marks within 90, zero after 730); 0 releases in 365 days (full marks at 4)health
  • Backlog pressure0.00
    88% of 16 scanned open issues are older than a year (full marks at <= 20%, zero at >= 80%)health
  • Contributor breadth0.74
    9 unique contributors in 90 days (full marks at 25); top contributor has 42% of commits; stars count for at most 5% of this signalhealth

Each signal is normalized to 0–1 with fixed thresholds; scores are weighted sums × 100. Stars are not an input.