commit | bc0ba8a8985fd461723f636d0b4d969efc7a7914 | [log] [tgz] |
---|---|---|
author | Evan Martin <[email protected]> | Wed Jun 14 11:56:31 2023 -0700 |
committer | Evan Martin <[email protected]> | Wed Jun 14 11:57:59 2023 -0700 |
tree | f86cdbe6379778f058537bbb1156c7a777f17e55 | |
parent | 24abe21297152411a15be31353faa583ccc672ac [diff] |
format markdown
n2 (pronounced “into”) implements enough of ninja to successfully build some projects that build with ninja.
I wrote it to explore some alternative ideas I had around how to structure a build system. In a very real sense the exploration is more important than the actual software itself, so you can view the design notes as one of the primary artifacts of this.
Here's a small demo of n2 building some of Clang.
$ cargo build --release $ ./target/release/n2 -C some/build/dir
When CMake executes Ninja it expects some particular Ninja behaviors. n2 emulates these behaviors when invoked as ninja
. To use n2 with CMake you can create a symlink:
ln -s path/to/n2 ninja
mklink ninja.exe path\to\n2
New-Item -Type Symlink ninja.exe -Target path\to\n2
somewhere in your $PATH
, such that CMake can discover it.
n2 is missing many Ninja features.
n2 does some things Ninja doesn't:
-d trace
generates a performance trace as used by Chrome's about:tracing
or alternatives (speedscope, perfetto).