faumaray 3b5d28d7b0
VoidBuildSystem CI / 1 · Requirements (push) Successful in 5s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m50s
VoidBuildSystem CI / 2A · Linux build (coverage) (push) Successful in 3m29s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 4m7s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m53s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m22s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m22s
VoidBuildSystem CI / 3A · Linux test (coverage) (push) Failing after 1m57s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 2m0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 19s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 18s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 7m8s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 7m24s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Skipped
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
feat(profiles): per-dependency overrides, toolchain pin and profile CLI (G3)
- Dependency::profile(name, DependencyProfileOptions) records per-profile
  compile/link options, defines, LTO and sanitizers. The native provider
  applies the matching override to the dependency's own ProfileContext and
  hashes the overrides into the provider input hash, so changing them
  invalidates cached dependency builds.
- vbs-toolchain.toml pins compiler, minimum version, C/C++ standards and
  sysroot (optional strict); it is loaded once and checked after every
  toolchain probe. Drift warns by default and fails with
  --locked-toolchain or strict = true; malformed pins fail with the TOML
  diagnostic.
- vbs profile list|show|diff lists declared profiles with parents, prints
  a resolved profile (flags, standards, LTO, sanitizers, sysroot) or the
  fields that differ between two.

Verified: dependency_profile_overrides_apply_to_native_builds (a define
from the override is required by the dependency source),
toolchain_pin_detects_and_enforces_drift and
profile_commands_list_show_and_diff pass; vbs_core_tests 8/8; CLI
contracts pass; clang-format clean.
2026-12-06 20:09:50 +03:00
2026-11-25 01:32:43 +03:00
2026-12-05 14:22:02 +03:00
2026-11-25 01:32:43 +03:00

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, Plan 20 Slices 1–2C / Track B, Track A Self-Hosting, & vbs ide Tooling):

  • Declaration SDK (Void::Build, <Void/Build.hpp>): VoidBuild_Sdk / Void::BuildSdk with version-1 deterministic UTF-8 JSON schema, profile inheritance and cycle detection, all seven TargetKinds, scoped options/defines/links, C (c_standard(CStandard)) and modern C++ (cxx_standard(CxxStandard)) controls, 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 C (gcc/clang) and C++ (g++/clang++) toolchain discovery/capability probing (including default system include dirs for clang-scan-deps), content-verified immutable snapshots (FICLONE/isolated copies, lookup guards), deterministic path prefix mapping + -frandom-seed, transactional CAS store (StateStore), bounded-parallel DAG execution (ProcessSupervisor with -pgid SIGTERM -> SIGKILL cleanup), and live Void::Log progress logging (--verbose/-v, --quiet/-q).
  • Zero-CMake Self-Building & Self-Testing build.cpp (Track A): Root build.cpp builds VoidLibrary via .native_builder(...) (first-class builder == "native" in Provider.cpp, zero CMake invocation) and declares all 13 targets (VoidBuildSdk, VoidBuildCore, GenerateBootstrapConfig, vbs, VoidBuildRegistry, vbs-registry, vbs_self_smoke, vbs_benchmarks, and all 5 Void::Testing VOID_TEST suites vbs_sdk_tests, vbs_core_tests, vbs_v1_tests, vbs_registry_tests, vbs_selfhost_tests). Stage 2 and Stage 3 vbs builds match bit-for-bit by SHA-256 across distinct build directories with cmake trapped on PATH.
  • Plan 20 Slices 1–2C / Track B — Bounded Native CMake & Meson Graph Translation: Translator.hpp / Translator.cpp configures CMake/Meson ONLY (zero cmake --build / meson compile), translates single- and multi-compile-group C/C++ targets (PerFileOption), bounded hermetic build.ninja CUSTOM_COMMAND / UTILITY / custom_target code generators (TargetKind::CustomAction), and foreign CMake C++20 CXX_MODULES fileSets (lowering onto VBS's P1689 scanner + ModuleBmi + cross-target module_bmis propagation on GCC 16 & Clang 23), exposes resolve_foreign_with_translation / vbs build|test --native-foreign, and explicitly diagnoses or falls back on unsafe/unbounded constructs (console pools, .util-only side-effects, out-of-tree writes, run targets, PCH, non-C/C++ languages, untracked link fragments).
  • Modern C++, Editor Metadata, Watchers & vbs ide: Full graph-integrated P1689r5 named modules & module partitions (with cross-target and imported module_bmis propagation on GCC -fmodule-mapper and Clang --precompile .pcm -> -fmodule-file=), explicit SourceKind::HeaderUnit, unity batches (excluding .c, modules, and per-file overrides), per-profile compile_commands.json (including build.cpp/build.profiles.cpp/build-support/ SDK entries for clangd), non-destructive IDE config generation (vbs ide generate for .clangd, .vscode/, .zed/, .idea/customTargets.xml), machine-readable workspace JSON (vbs ide query), and Linux inotify build/metadata watching via Void::FileSystem::DirectoryWatcher (MetadataOnly never triggers builds or foreign configures).
  • Native Package Manager, Foreign Providers, Bridge & Install: Void::Data::Toml 1.0 parser/merger, PubGrub-style SemVer solver (Void::Semver::parse_range), context-aware CAS vbs.lock, live registry HTTP/1.1 client (vbs publish, vbs deps resolve|update, vbs build --locked against vbs-registry), deterministic PAX/USTAR .tar packaging & staged safe extraction (Void::Archive), native/CMake/Meson 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-registry HTTP/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/), native VoidLibrary & full VbsSelfHostRecipe recipes (recipes/VoidLibrary/, recipes/SelfHost/) compiling the full Stage 1 vbs binary without CMake to build & test Stage 2/3 projects, and native VOID_TEST (VL-009) registration eliminating external CMake test scanning.
  • Maximal VoidLibrary Reuse (0002e74a...): Built directly on VoidLibrary Configuration (Void::Argparse::Parser with nested subcommands, option_many, and 100% auto-generated --help across vbs, vbs-registry, vbs_describe, and vbs_benchmarks; Void::Configuration::get_env/get_env_or), Crypto (Void::Crypto::Hasher zero-dep SHA-256), Archive (Void::Archive::create & extract_staged), Data (Void::Data::Toml, Void::Json::Strict), System (Void::Process::spawn/communicate_blocking/enable_subreaper, Void::FileSystem::DirectoryWatcher/FileLock/reflink_copy_file/set_canonical_mtime/atomic_symlink_swap, Void::Process::SignalWatcher), 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::parse_range), Log (Void::Log), Core (Void::Scope::on_exit), Time (Void::Time::Stopwatch), and Testing (VOID_TEST).
  • Remaining future design scope: Plan 20 Slice 3 and Post-v1 Expansion Roadmap Tracks C–D and E2/E3 daemon/E4 (Track C macOS/Windows/cross-compilation, Track D shared HTTP CAS & supply-chain provenance, Track E2 workspace.cpp, Track E3 vbs daemon, Track E4 Void::Net/Void::Sqlite, and live conan CLI verification) remain planned architectural scope.

Start with the roadmap plans, expansion roadmap, 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).

Bootstrap build (CMake)

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 3e254055e081a104f08df68dde39711bc7813518. 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

Docker build & test (GCC 16)

The VoidLibrary development image provides GCC 16 with C++26 reflection, CMake 4 and Ninja. Mount this repository and run the bootstrap build and tests inside it:

docker run --rm --user "$(id -u):$(id -g)" -e HOME=/tmp -v "$PWD":/src -w /src \
  voidlibrary-dev:latest bash -lc '
    cmake -S . -B build/docker -G Ninja -DCMAKE_BUILD_TYPE=Debug &&
    cmake --build build/docker --parallel 4 &&
    ctest --test-dir build/docker --output-on-failure'

To build against a local VoidLibrary checkout instead of fetching the pinned revision, add -DVBS_VOID_SOURCE_DIR=/path/to/VoidLibrary and mount that checkout into the container.

Self-building and self-testing VoidBuildSystem with vbs

Once the bootstrap vbs binary is built, VoidBuildSystem builds VoidLibrary and tests all binaries and full VOID_TEST suites directly from root build.cpp with zero CMake invocation and live progress logs (-v/--verbose for debug detail, -q/--quiet for warnings/errors only):

dev cpp-gcc -c build/dev/bin/vbs test --build-dir build/vbs-stage2 --profile release
build/vbs-stage2/profiles/release/out/bin/vbs --version
build/vbs-stage2/profiles/release/out/bin/vbs --help

For offline/local VoidLibrary development during vbs build, set VBS_VOID_SOURCE_DIR=/path/to/VoidLibrary.

Note on optional system dependencies: Void::Crypto (VL-007) and Void::Archive (VL-006) now build cleanly with zero external system dependencies in dev cpp-gcc. SQLite3, Boost/OpenSSL (for Void::Net), and conan remain optional; VBS links Void::Sqlite automatically when system SQLite3 is installed and uses its verified pure-C++/POSIX adapters otherwise (tracked in docs/VOIDLIBRARY_UPSTREAM_REQUESTS.md). conan invocation requires conan in PATH and fails explicitly with a missing-prerequisite diagnostic when absent.

CLI Reference

All CLI help text (vbs --help, vbs <command> --help, vbs compdb --help, vbs deps --help, vbs-registry --help, etc.) is auto-generated directly by Void::Argparse::Parser:

  • vbs [--version] [--verbose] [--quiet] <command>
  • vbs init [--dir DIR] [--name NAME] [--library] [--with-toml] [--force]
  • vbs build [--project DIR] [--build-dir DIR] [--profile NAME]... [--target NAME]... [--compiler gcc|clang] [--editor-profile NAME] [--build-source FILE]... [--jobs N] [--member PKG]... [--changed-since REF] [--sbom FILE] [--sbom-format spdx|cyclonedx] [--remote-cache URL] [--remote-cache-token-env VAR] [--trusted-public-key HEX]... [--trusted-key-file FILE]... [--locked] [--offline] [--no-cache] [--native-foreign] [--verbose] [--quiet]
  • vbs test ... (same flags as vbs build, then runs selected TargetKind::Test binaries)
  • vbs clean [--build-dir DIR] [--all]
  • vbs doctor
  • vbs graph [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang] [--format dot|json]
  • vbs describe [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang]
  • vbs compdb use|show|export|watch ...
  • vbs ide generate|query [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang] [--editor all|clangd|vscode|clion|zed] [--force]
  • 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 [--bundle-dependencies] [--archive FILE] [--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 DIR
  • vbs pack [--project DIR] [--output FILE]
  • vbs publish --registry URL --name PKG --version X.Y.Z [--project DIR] [--description TEXT] [--token-env VAR] [--signing-key FILE] [--private]
  • vbs publish-binary --registry URL --name PKG --version X.Y.Z --variant ID --file ARTIFACT [--signing-key FILE] [--token-env VAR]
  • vbs binaries list|fetch --registry URL --name PKG --version X.Y.Z [--variant ID --output FILE] [--trusted-public-key HEX]... [--trusted-key-file FILE]... [--token-env VAR]
  • vbs releases list --registry URL --name PKG [--token-env VAR]
  • vbs bridge --request FILE --output FILE (backend for cmake/bridge/VbsDeps.cmake)
  • vbs gc [--build-dir DIR] [--max-bytes N]
  • vbs daemon run|status|stop|gc|recover|describe|build|ide query|ide generate|ide poll|ide wait|ide status|compdb use|compdb export|compdb entries [--file PATH] [--limit N]|graph [--format dot|json]|test [--target NAME] [--project DIR] [--member NAME] [--build-dir DIR] [--socket PATH](Unix-socket daemon holding a warm state store and project watcher;run` serves in the foreground, the rest are client requests)
  • vbs gen-tests --input FILE --output-dir DIR
  • vbs-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");
    }
}

Workspaces

A workspace root declares member projects in workspace.cpp:

#include <Void/Build.hpp>

void workspace(Void::Build::Workspace &ws) {
    ws.member("lib", "packages/lib");
    ws.member("app", "packages/app");
    ws.member("tests", "packages/tests");
}

Each member keeps its own build.cpp and profiles, while vbs build/vbs test at the root share one vbs.lock and one build/.vbs CAS. Members link each other with project.workspace_dependency("lib").target("libcore"), and --member PKG or --changed-since REF select affected members.

See the SDK reference, public header, and VoidLibrary upstream requests.

Licensed under MIT.

S
Description
No description provided
Readme MIT
2.7 MiB
0 Stars 3 Watchers 0 Forks
v1.0.0
Latest
2026-12-06 12:28:24 +00:00
Languages
C++ 97.4%
CMake 1.6%
JavaScript 0.5%
Shell 0.2%
HTML 0.2%