macOS
brew install build2local Homebrew formula metadata
安装
brew install build2local Homebrew formula metadata
sudo dnf install bdepFedora Rawhide package metadata · bdep · 来源: dl.fedoraproject.org
nix profile install nixpkgs#build2nixpkgs package indexes · pkgs/by-name/bu/build2/package.nix · 来源: api.github.com
winget install --id build2.build2.MSVC -eWindows Package Manager source index · build2.build2.MSVC · 来源: cdn.winget.microsoft.com
概览
C/C++ Build Toolchain
历史
build2 is a cross-platform, MIT-licensed C/C++ build toolchain made of a build system, package manager, project manager, and supporting libraries.
The build2 project started in the mid-2010s with documentation copyright dating from 2014 and public toolchain tags beginning at 0.1.0. Its stated goal is to approximate Rust Cargo's convenience for C and C++ while keeping enough depth for complex real-world build requirements.
The toolchain is intentionally hierarchical: `b` is the general-purpose build system, `bpkg` handles package consumption, and `bdep` handles project development. The `build2-toolchain` repository is an amalgamation used to build and package those components together.
build2 has remained a specialist C/C++ toolchain rather than a default ecosystem standard like CMake, but its own community page says it is used for real development and cites customer-facing software such as ODB and XSD. The project also maintains cppget.org as its package repository.
It is packaged by Homebrew, Nix, Fedora-style `bdep` packages, and Windows winget according to the input. Upstream development happens in self-hosted git repositories on git.build2.org with GitHub mirrors for collaboration.
Users typically create or initialize projects with `bdep`, build with `b`, and consume dependencies with `bpkg`. The documented configuration surface includes project-local `build/config.build`, `.build2/` state, `.build2/local/`, user-level `~/.build2/`, and system-level `/etc/build2/` locations.
The toolchain is aimed primarily at C/C++ and mixed-language projects involving C or C++, though the project describes a longer-term universal build-toolchain goal.
build2 is significant because it is one of the more complete attempts to give C and C++ a Cargo-like combined build, package, and project-management workflow without hiding the complexity needed by native-code builds.
For package managers, it is also recursive in an interesting way: the build2 toolchain is used for its own development, and the upstream amalgamation repository exists specifically to make source builds and binary packaging of the whole toolchain practical.
安全态势
generalized runtime or code generation signal.
yellow 风险 · 中 置信度 · runtime
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
build/config.build.build2/.build2/local/~/.build2//etc/build2/可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
b | cli | 全局可执行文件 | |
bdep | cli | 全局可执行文件 | |
bpkg | cli | 全局可执行文件 | |
bx | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:build2 |
|---|---|
| 版本 | 0.18.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/build2 |
| 主页 | https://build2.org |
| 仓库 | https://git.build2.org/cgit/build2-toolchain |
| 上游文档 | https://build2.org/bdep/doc/build2-project-manager-manual.xhtml |
| 许可证 | MIT |
| 源码归档 | https://download.build2.org/0.18.1/build2-toolchain-0.18.1.tar.xz |
| 最后更新 | 2026-06-27T13:57:07Z |
| Pulse | updated |
| macOS 提供的库 | curl, openssl |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | build2 |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
build2
nix profile install nixpkgs#build2bdep 0.17.0-7.fc44
build2 project dependency manager
sudo dnf install bdepbdep-doc 0.17.0-7.fc44
bdep documentation
sudo dnf install bdep-docbpkg 0.17.0-7.fc44
build2 package dependency manager
sudo dnf install bpkgbpkg-doc 0.17.0-7.fc44
bpkg documentation
sudo dnf install bpkg-docbuild2 0.17.0-7.fc44
Cross-platform build toolchain for developing and packaging C++ code
sudo dnf install build2build2-doc 0.17.0-7.fc44
build2 documentation
sudo dnf install build2-docbuild2-rpm-macros 0.17.0-7.fc44
build2 RPM macros
sudo dnf install build2-rpm-macroslibbpkg 0.17.0-7.fc44
build2 package dependency manager library
sudo dnf install libbpkglibbpkg-devel 0.17.0-7.fc44
Development files for build2 package dependency manager library
sudo dnf install libbpkg-devellibbuild2 0.17.0-7.fc44
build2 library
sudo dnf install libbuild2libbuild2-devel 0.17.0-7.fc44
Development files for build2 library
sudo dnf install libbuild2-devellibbutl 0.17.0-7.fc44
build2 utility library
sudo dnf install libbutllibbutl-devel 0.17.0-7.fc44
Development files for build2 utility library
sudo dnf install libbutl-develbuild2.build2.MSVC
winget install --id build2.build2.MSVC -ebuild2.build2.MinGW
winget install --id build2.build2.MinGW -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.