Ninja is a small build system with a focus on speed

(github.com)

41 points | by tosh 3 days ago

4 comments

  • woctordho 5 hours ago
    If someone sees this: The ninja package on PyPI [0] currently stays at version 1.13.0 . There is an issue in 1.13.0 preventing it building projects on Windows. The issue is already fixed in 1.13.1 almost a year ago, but the PyPI package hasn't got an update, see [1], and many downstream projects have to stay at 1.11 . I hope it could update soon.

    [0] https://pypi.org/project/ninja/

    [1] https://github.com/scikit-build/ninja-python-distributions/i...

    • endgame 35 minutes ago
      Why is a C++ project being distributed on PyPi at all?
  • jonstewart 59 minutes ago
    The absolute best thing about coding agents is not having to waste time on build systems. I had Claude code port my autotools scripts to meson (which uses ninja) and it’s been a huge quality of life improvement.
    • reactordev 41 minutes ago
      Soon you won’t even have to waste time on the code part…
      • tom_ 30 minutes ago
        It's only a waste of your tine if you don't want to do it.
  • shevy-java 3 hours ago
    All the main build tools (cmake, meson/ninja and GNU configure) have different benefits. For instance, I expect "--help" to work, but only really GNU configure supports it as-is. I could list more advantages and disadvantages in general here, but by and large I prefer meson/ninja. To me it feels by far the fastest and I also have the fewest issues usually (excluding python breaking its pip stack but that's not the fault of meson as such). ninja can be used via cmake too but most uses I see are from meson.
    • flohofwoe 2 hours ago
      > ninja can be used via cmake too but most uses I see are from meson

      How do you know though when the choice of cmake-generator is entirely up to the user? E.g. you can't look at a cmake file and know what generator the user will select to build the project.

      FWIW I usually prefer the Ninja generator over the Makefile generator since ninja better 'auto-parallelises' - e.g. with the Makefile generator the two 'simple' options are either to run the build single-threaded or completely grind the machine to a halt because the default setting for 'parallel build' seems to heavily overcommit hardware resources. Ninja just generally does the right thing (run parallel build, but not enough parallelism to make the computer unusable).

      • plq 41 minutes ago
        ninja supports separate build groups and different max number of parallel jobs for each. CMake's ninja generator puts compilation and linking steps in their own respective groups. End result is by default `nproc` parallel jobs for compilation but 1 job for linking. This helps because linking can be way more memory intensive or sometimes the linker itself has support for parallelism. Most projects have only a handful of linking steps to run anyway.
  • chmorgan_ 35 minutes ago
    [dead]