n2 is intended to be able to build any project that Ninja can load. Here is a comparison of things n2 does worse and better than Ninja.
Here are some things n2 improves over Ninja:
- Builds are more incremental: n2 starts running tasks as soon as an out of date one is found, rather than gathering all the out of date tasks before executing as Ninja does.
- Fancier status output, modeled after Bazel. Here's a small demo.
-d trace
generates a performance trace that can be visualized by Chrome'sabout:tracing
or alternatives (speedscope, perfetto).
- Windows is incomplete.
- Ninja has special handling of backslashed paths that n2 doesn't yet follow.
- Dynamic dependencies.
console
pool. n2 currently just treatsconsole
as an ordinary pool of depth 1, and only shows console output after the task completes. In practice this means commands that print progress when run currently show nothing until they're complete.subninja
is only partially implemented.
-l
, load average throttling-n
, dry run
Most of -d
(debugging), -t
(tools).
No -w
(warnings).