ninja-build/ninja
View on GitHub ↗ ★ 13,333 C++
a small build system with a focus on speed
43 mentions on Hacker News by 30 people: 2 stories, 41 comments · first 2011-02-06 · latest 2026-08-05
20082026
-
…of a segmentation fault when the build file is damaged; - Use a better order of execution: https://github.com/ninja-build/ninja/issues/2157
comment by zX41ZdbW · 2026-08-05 · in Faster Than Ninja -
…1.13.2 is broken (as currently in debian unstable) get the latest version from git, fixed by https://github.com/ninja-build/ninja/pull/2764
comment by gjvc · 2026-06-01 · in ninja is always recompiling everything -
▲ 2
ninja is always recompiling everythingstory by gjvc · 2026-06-01 · 1 comment
-
Good news, I've been working an adding file content hashing to Ninja: https://github.com/ninja-build/ninja/pull/2735 That will fix the "switch branches back and forward" case :)
comment by jhasse · 2026-03-31 · in Ninja is a small build system with a focus on speed -
…and large projects. You switched some branches back and forward? Enjoy your 20 minutes rebuild. * https://github.com/ninja-build/ninja/issues/1459
comment by Svoka · 2026-03-30 · in Ninja is a small build system with a focus on speed -
…make. There is (at least) one open issue about this - the solution/alternatives are not trivial: https://github.com/ninja-build/ninja/issues/1459
comment by jasonpeacock · 2026-03-30 · in Ninja is a small build system with a focus on speed -
▲ 112
Ninja is a small build system with a focus on speedstory by tosh · 2026-03-27 · 64 comments
-
…support to the Makefile generator. Ninja itself doesn't have any support for C++ modules (see https://github.com/ninja-build/ninja/issues/2457 ). In fact, Ninja has fewer features in that regard than plain Make as Ninja requires all…
comment by wahern · 2025-06-20 · in Learn Makefiles -
…JSON would have been a better option I think, given the abundance of tooling around it. -- 1: https://github.com/ninja-build/ninja/wiki/List-of-generators... 2: https://ninja-build.org/manual.html#ref_ninja_file
comment by emmanueloga_ · 2024-11-29 · in The success and failure of Ninja (2020) -
…name. The name is great! PS. It's possible to make it even faster if we implement this: https://github.com/ninja-build/ninja/issues/2157 But you explained in the article that the tool intentionally lacks state, even tiny hints from…
comment by zX41ZdbW · 2024-11-28 · in The success and failure of Ninja (2020) -
…of them by the original author (although by loc changed their weight is higher). Interesting! https://github.com/ninja-build/ninja/graphs/contributors ### Bunch of other comments ### > users of ninja ... all Meson projects, which appears…
comment by einpoklum · 2024-11-28 · in The success and failure of Ninja (2020) -
…that has some similar data structures to those in the blog post, you might find it interesting! [1] https://github.com/ninja-build/ninja/blob/dcefb838534a56b262... [2] https://neugierig.org/software/blog/2022/03/n2.html
comment by evmar · 2024-06-26 · in The plan-execute pattern -
…another program. This is how we can sidestep many policy decisions." The other options are here: https://github.com/ninja-build/ninja/wiki/List-of-generators... [1] https://ninja-build.org/manual.html#_design_goals
comment by qart · 2024-04-28 · in How I stopped worrying and loved Makefiles -
…I have encountered crashes in Ninja (not lld), caused by corrupted on-disk state I had to delete: https://github.com/ninja-build/ninja/issues/1978 . I think I traced it down to a memory indexing or null pointer error, which would've been…
comment by nyanpasu64 · 2022-05-11 · in My story on “worse is better” (2018) -
…good regarding ETA. This Ninja PR comes pretty close to the best possible solution I can think of: https://github.com/ninja-build/ninja/pull/1963
comment by jhasse · 2022-03-28 · in N2: Alternative Ninja Implementation -
If someone wanted to reimplement ninja and add support for the GNU Make job server, I'd be sold. https://github.com/ninja-build/ninja/issues/1139 At a certain scale (i.e. package management and not a mono build system), having a common job…
comment by humanrebar · 2022-03-25 · in N2: Alternative Ninja Implementation -
…please do the smartest thing you can" wrapper) because it performed better on OS X and Solaris: https://github.com/ninja-build/ninja/commit/89587196705f54af...
comment by evmar · 2022-02-28 · in Fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid -
…"restat"). I've been using this in my build system to make the explain output slightly more useful: https://github.com/ninja-build/ninja/pull/2067 It's just a quick hack that took me half a day (most of which was remembering how to C++…
comment by drothlis · 2022-01-10 · in Proposal to add build graph output to GNU Make (2020) -
…opinion on this, but a comment in the article lead me to this discussion, which is just wild: https://github.com/ninja-build/ninja/issues/1482 I get a sense that the maintainers hold a similar sentiment as the author of this piece, but…
comment by vHMtsdf · 2021-04-01 · in Don’t use environment variables for configuration -
there's an astonishingly silly GitHub issue thread linked in the comments of the post: https://github.com/ninja-build/ninja/issues/1482
comment by zackkrida · 2021-04-01 · in Don’t use environment variables for configuration -
…it for its intended use without first looking hard at modern alternatives. (perhaps starting here? https://github.com/ninja-build/ninja/wiki/List-of-generators... ) But for solving the problem of "where should we keep our developer command…
comment by jrrrr · 2021-03-25 · in Why I Prefer Makefiles over Package.json Scripts -
…possible, mainly because it can generate ninja build files. It would be great to see autotools on https://github.com/ninja-build/ninja/wiki/List-of-generators...
comment by chaz6 · 2021-01-26 · in Future Plans for Autotools -
…fork with this patch applied, available in the `ninja` package on PyPI and probably elsewhere. [1] https://github.com/ninja-build/ninja/issues/1139
comment by ihnorton · 2020-10-27 · in Ninja: A simple way to do builds -
As it turns out, this is more or less what ninja does: https://github.com/ninja-build/ninja/blob/master/src/disk_in...
comment by pianoben · 2020-05-14 · in The Success and Failure of Ninja -
…approaches and the final Windows approach is pretty complex. Look at the WIN32-related ifdefs in https://github.com/ninja-build/ninja/blob/master/src/disk_in... (I would link to something specifically but it's not that long of a file.)
comment by evmar · 2020-05-14 · in The Success and Failure of Ninja -
…in to the speed problems on Windows, and links to a quick run down of the speed comparisons¹. 1. https://github.com/ninja-build/ninja/wiki/Timing-Numbers
comment by JNRowe · 2020-05-14 · in The Success and Failure of Ninja -
…Anyway, if anyone is working on a very large project and wishes ninja started faster, try this PR: https://github.com/ninja-build/ninja/pull/1438
comment by modeless · 2020-05-14 · in The Success and Failure of Ninja -
…common, or a bad workman blames his tools, but for me at least it wasn't a nice experience. [1]: https://github.com/ninja-build/ninja/issues/1459
comment by londons_explore · 2020-03-13 · in Google Open Source Code Search -
…do that? Such a mystery... 1: https://github.com/BuckleScript/bucklescript/graphs/contribu... 2: https://github.com/ninja-build/ninja 3: https://github.com/BuckleScript/bucklescript/commit/a626ee8b...
comment by emmanueloga_ · 2020-02-25 · in Functional Programming in OCaml -
I'll second you on ninjabuild. I just wish https://github.com/ninja-build/ninja/pull/1578 would get merged, so I can compose ninjabuild repos seamlessly.
comment by sounds · 2019-12-17 · in An opinionated approach to GNU Make -
FWIW I encountered re2c in the Ninja lexer https://github.com/ninja-build/ninja/blob/master/src/lexer.i... and then used it for my own huge shell lexer: The Oil Lexer: Introduction and Recap http://www.oilshell.org/blog/2017/12/15.html The…
comment by chubot · 2019-03-01 · in Re2c: A free and open-source lexer generator for C and C++ -
I used this forking trick to speed up the ninja build system too: https://github.com/ninja-build/ninja/pull/1438 Unfortunately the maintainers didn't like the idea so it won't be merged. But if your project is large enough that ninja takes…
comment by modeless · 2018-11-21 · in D compilation is too slow and I am forking the compiler -
…used) / https://ninja-build.org/manual.html#_deps (database-like thing with some mtimes, see https://github.com/ninja-build/ninja/blob/master/src/deps_lo... )
comment by evmar · 2018-11-18 · in Mtime comparison considered harmful -
…I found this one incredibly helpful when I had a build with tons of 1:N, N:1, N:M dependencies. [1] https://github.com/ninja-build/ninja [2] http://pydoit.org/
comment by zuzun · 2017-03-14 · in Buck – A build system developed and used by Facebook -
…(regexes are a succinct way of expressing lexing) and faster than the lower-level hand-rolled code. https://github.com/ninja-build/ninja/blob/3082aa69b7be2a2a06...
comment by evmar · 2016-12-03 · in Adventures in the land of substrings and RegExps -
…using a make-based backend (NMake on Windows, GNU Make on OS X and Linux) to the Ninja one (see https://github.com/ninja-build/ninja ). Based on my notes from the time, full build times were basically unaffected on a per-core basisi - but…
comment by to3m · 2016-01-01 · in Benchmarks of various C++ build tools -
…it) and eventually used a lexer generator, which uses a combination of lookup tables and tests. https://github.com/martine/ninja/blob/master/src/lexer.cc#L1...
comment by evmar · 2015-09-16 · in Eliminating branches in Rust for fun but not much profit -
…as well. I've had good success generating the files manually using something like ninja_syntax.py: https://github.com/martine/ninja/blob/master/misc/ninja_synt... . I also note that google are working on a successor to GYP, GN which…
comment by asb · 2014-04-21 · in Build Tools – Make, no more -
…preserving the option of dropping down to low-level trickiness if that's what you really need. [1] https://github.com/martine/ninja/blob/master/src/lexer.in.cc... [2] https://github.com/martine/ninja/blob/master/src/lexer.cc#L1...
comment by evmar · 2014-01-09 · in Optimising Haskell for a tight inner loop -
…under 100ms to stat the ~40k source files Chrome uses in its build (see the "node stat" lines here: https://github.com/martine/ninja/wiki/Timing-Numbers ). At its best point I think we got the one-file-changed build/compile/link cycle of…
comment by evmar · 2013-05-30 · in Watchman: Faster builds with large source trees -
Check out gyp and ninja https://code.google.com/p/gyp/wiki/GypVsCMake https://github.com/martine/ninja
comment by greggman · 2013-05-21 · in Phantompy - Headless WebKit engine for Python, like phantomjs -
Thanks for the GetFileAttributesEx tip -- https://github.com/martine/ninja/commit/93c78361e30e33f950ee...
comment by evmar · 2011-12-22 · in Why is Windows so slow? -
Direct link to the GitHub project: https://github.com/martine/ninja I'm always interested in alternatives to Make because I just find it so painful. However, I'd say that only about half of Make-related pain comes from its dependency…
comment by edsrzf · 2011-02-06 · in Chromium Notes: Ninja, a new build system