VoidBuildSystem
A native C++26 build system and package manager for Void projects, built with
VoidLibrary. Build descriptions and
profile definitions live in ordinary build.cpp, build.profiles.cpp, and
build-support/**/*.cpp/.hpp files; declarative package manifests also support
vbs.deps.toml normalized to the exact same dependency model.
Implemented scope (Plans 01–19):
- Declaration SDK (
Void::Build,<Void/Build.hpp>):VoidBuild_Sdk/Void::BuildSdkwith version-1 deterministic UTF-8 JSON schema, profile inheritance and cycle detection, all sevenTargetKinds, scoped options/defines/links, modern C++ flags, install rules, and symbolic TOML manifest references. - Native Core Engine (
VoidBuild_Core/Void::BuildCore): out-of-process host descriptor compilation, graph lowering and transitive visibility resolution, GCC 16 & Clang 23 toolchain discovery/capability probing, content-verified immutable snapshots (FICLONE/isolated copies, lookup guards), transactional CAS store (StateStore), and bounded-parallel DAG execution (ProcessSupervisorwith-pgidSIGTERM -> SIGKILLcleanup). - Modern C++, Editor Metadata & Watchers: Full graph-integrated P1689r5 named modules & module partitions (GCC
-fmodule-mapperand Clang two-step--precompile.pcm->.o+ transitive-fmodule-file=), explicitSourceKind::HeaderUnitcompilation, unity batches (excluding modules and per-file overrides), incompatible sanitizer rejection, per-profilecompile_commands.jsonwith monotonic selection tickets and user-file preservation, and Linuxinotifybuild/metadata watching (MetadataOnlynever triggers builds or foreign configures). - Native Package Manager, Foreign Providers, Bridge & Install: TOML 1.0 parser/merger, PubGrub-style SemVer solver, context-aware CAS
vbs.lock, live registry HTTP/1.1 client (vbs publish,vbs deps resolve|update,vbs build --lockedagainstvbs-registry), deterministic PAX/USTAR.tarpackaging with safe extraction, CMake File API & Meson introspection providers (plus explicit-error Conan2 adapter),cmake/bridge/VbsDeps.cmake, and staged relocatable install/export/uninstall. - Registry Service, Web Admin UI & Native Self-Hosting:
vbs-registryHTTP/1.1 service (VoidBuild_Registry/Void::BuildRegistry) with RBAC, salted password hashes, CSRF/HttpOnly session auth, immutable releases, backup/restore, XSS-safe DOM-only web UI (registry/web/), nativeVoidLibrary& fullVbsSelfHostReciperecipes (recipes/VoidLibrary/,recipes/SelfHost/) compiling the full Stage 1vbsbinary without CMake to build & test Stage 2 projects, and non-CMakeVoid::Testingregistration generator (vbs gen-tests). - VoidLibrary Reuse: Built directly on VoidLibrary
Configuration(Void::Argparse::Parseracrossvbs,vbs-registry,vbs_describe, andvbs_benchmarks;Void::Configuration::get_env/get_env_or),Algorithms(Void::Algorithms::topological_order),Async(Void::Concurrency::ThreadPool),Unicode(Void::Unicode::validate_utf8),Text(Void::Str,Void::Encoding::Hex,Void::Encoding::Url,Void::Semver),Core(Void::Scope::on_exit),Time(Void::Time::Stopwatch),Data(Void::Json::Strict),System(Void::FileSystem,Void::Process::SignalWatcher), andTesting. - Remaining future design scope: Plan 20 — Later native foreign execution and platform ports (native foreign graph translation and Windows/macOS ports) remains planned architectural scope.
Start with the twenty roadmap plans, architecture, requirements, and verification log.
Naming Conventions
- C++ namespace:
Void::Build - Public umbrella header:
<Void/Build.hpp>(include/Void/Build.hpp) - Internal headers and sources: PascalCase paths under include/Void/Build/ and src/
- Types and enum constants:
PascalCase(Visibility::Public,CompilerFamily::Gcc,TargetKind::Executable, etc.); functions and methods:snake_case - CMake targets:
VoidBuild_Sdk(Void::BuildSdk),VoidBuild_Core(Void::BuildCore),VoidBuild_Registry(Void::BuildRegistry),VoidBuild_Options - CLI & project files:
vbs,vbs-registry,vbs.deps.toml,vbs.lock,.vbs/,VbsDeps.cmake
Building & Testing
Requirements: GCC 16+ with C++26 -freflection, CMake 4.0+, Git, and Ninja (verified on NixOS via dev cpp-gcc with GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2, Meson 1.12.1; Clang target matrix verified via dev cpp with Clang 23.1.3 and clang-scan-deps).
dev cpp-gcc -c cmake -S . -B build/dev -G Ninja \
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
dev cpp-gcc -c cmake --build build/dev --parallel 4
dev cpp-gcc -c ctest --test-dir build/dev --output-on-failure
dev cpp-gcc -c build/dev/bin/vbs_benchmarks --files 15
CMake fetches VoidLibrary at pinned commit 9931c5ffc4844a5e09e1b1db35b3d29c5097c3a5.
For development against a local checkout without mutating the pin:
dev cpp-gcc -c cmake -S . -B build/dev-local -G Ninja \
-DCMAKE_BUILD_TYPE=Debug -DVBS_VOID_SOURCE_DIR=../VoidLibrary
Note on optional system dependencies: dev cpp-gcc provides pure-C++/Threads dependencies without external SQLite3, OpenSSL, LibArchive, or conan. Void::BuildCore links optional VoidLibrary modules when available and provides verified swappable local adapters in the meantime (tracked in docs/VOIDLIBRARY_UPSTREAM_REQUESTS.md). Note that conan invocation requires conan in PATH and fails explicitly with a missing-prerequisite diagnostic when absent.
CLI Reference
vbs build [--project DIR] [--build-dir DIR] [--profile NAME]... [--target NAME]... [--compiler gcc|clang] [--editor-profile NAME] [--build-source FILE]... [--jobs N] [--locked] [--offline] [--no-cache]vbs test ...(same flags asvbs build, then runs selectedTargetKind::Testbinaries)vbs describe [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang]vbs compdb use|show|export|watch ...vbs watch [--project DIR] [--build-dir DIR] [--profile NAME] [--target NAME]...vbs deps resolve|update [--project DIR] [--build-dir DIR] [--profile NAME] [--offline]vbs install --prefix DIR [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang] [--package-name NAME] [--package-version VER] [--component NAME] [--no-cmake-export] [--no-native-export]vbs uninstall --prefix DIRvbs pack [--project DIR] [--output FILE]vbs publish --registry URL --name PKG --version X.Y.Z [--project DIR] [--description TEXT] [--token-env VAR] [--private]vbs bridge --request FILE --output FILE(backend for cmake/bridge/VbsDeps.cmake)vbs gc [--build-dir DIR] [--max-bytes N]vbs gen-tests --input FILE --output-dir DIRvbs-registry --data-dir DIR --web-root DIR [--bind ADDR] [--port PORT] ...
Ordinary C++ & TOML Declarations
#include <Void/Build.hpp>
void build(Void::Build::Project &project) {
project.dependencies_file("vbs.deps.toml");
auto core = project.static_library("core");
core.cxx_standard(Void::Build::CxxStandard::Cxx26)
.sources(project.glob("src/core/*.cpp"))
.include_directory("include", Void::Build::Visibility::Public);
auto app = project.executable("app");
app.sources({"src/main.cpp"}).link(core);
if (project.context().compiler == Void::Build::CompilerFamily::Clang) {
app.compile_option("-Wextra-semi");
}
}
See the SDK reference, public header, and VoidLibrary upstream requests.
Licensed under MIT.