macOS
brew install ninjalocal Homebrew formula metadata
sudo port install ninjaMacPorts ports tree · devel/ninja/Portfile · 来源: api.github.com
安装
brew install ninjalocal Homebrew formula metadata
sudo port install ninjaMacPorts ports tree · devel/ninja/Portfile · 来源: api.github.com
nix profile install nixpkgs#ninjanixpkgs package indexes · pkgs/by-name/ni/ninja/package.nix · 来源: api.github.com
sudo pacman -S ninjaArch Linux sync databases · ninja · 来源: geo.mirror.pkgbuild.com
sudo zypper install ninjaopenSUSE Tumbleweed package metadata · ninja · 来源: download.opensuse.org
choco install ninjaChocolatey community package catalog · ninja · 来源: community.chocolatey.org
scoop install main/ninjaScoop official bucket manifest trees · bucket/ninja.json · 来源: api.github.com
winget install --id Ninja-build.Ninja -eWindows Package Manager source index · Ninja-build.Ninja · 来源: cdn.winget.microsoft.com
概览
Small build system for use with gyp or CMake
历史
Ninja is a small, low-level build system optimized for fast incremental builds. Its central idea is deliberately narrow: higher-level tools such as GN, GYP, CMake, Meson, or custom generators decide the project model, and Ninja executes the already-lowered build graph quickly.
Evan Martin wrote Ninja while working on Google Chrome. In his Performance of Open Source Software chapter, he says he started Ninja in 2010 as an experiment to make Chrome builds faster, especially the front of the build where the tool loads build files and starts the first compile. This led to the design that made `.ninja` files simple, generated, and quick to parse.
The project became public and then broadened beyond Chrome. The same history says Ninja gradually replaced other build systems used by Chrome, CMake gained a Ninja generator, and projects such as LLVM and ReactOS used it through CMake. The Ninja homepage later summarized the tool as an assembler-like build system used by Google Chrome, parts of Android, LLVM, and many CMake-backed projects.
Ninja's adoption is unusually strong for such a small tool because it sits at the bottom of many developer workflows. Developers may never hand-write `build.ninja`, but they install Ninja because CMake, Meson, GN, or language build systems generate it and expect a fast executor.
On 2026-07-01, Homebrew listed Ninja 1.13.2 with 545,459 installs over 365 days and 352,367 installs-on-request. That install volume is a package-manager reflection of Ninja's role as a build substrate rather than a tool people necessarily think about directly.
The normal package-nerd workflow is `cmake -G Ninja -S . -B build` or a Meson/GN equivalent, followed by `ninja -C build`. By default, `ninja` looks for `build.ninja` in the current directory and builds all out-of-date targets; flags such as `-C` and `-j` intentionally resemble Make, although Ninja already runs jobs in parallel by default.
Ninja build files are plain text and debuggable, but the project explicitly does not optimize for hand authoring. This makes the package easy to reason about in dependency graphs: if a formula or language package depends on Ninja, it usually means some higher-level generator will emit the actual build plan.
Ninja is one of the canonical examples of doing less and winning: no general-purpose project language, no rich conditionals, no policy layer, just a fast executor. Its package significance is huge because it became the common backend for CMake/Meson/GN-era native builds across macOS, Linux, Windows, and cross-platform CI.
安全态势
build system capable of executing project logic.
yellow 风险 · 高 置信度 · runtime
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
ninja | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/ninja-build/ninja
安装元数据
| 软件包键 | brew:ninja |
|---|---|
| 版本 | 1.13.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/ninja |
| 主页 | https://ninja-build.org/ |
| 仓库 | https://github.com/ninja-build/ninja |
| 上游文档 | https://ninja-build.org/manual |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.2.tar.gz |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | ninja |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
ninja
nix profile install nixpkgs#ninjaninja 1.13.2-3
Small build system with a focus on speed
sudo pacman -S ninjaninja 1.13.2-1.3
A small build system closest in spirit to Make
sudo zypper install ninjaninja
sudo port install ninjaninja
choco install ninjamain/ninja
scoop install main/ninjaNinja-build.Ninja
winget install --id Ninja-build.Ninja -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.