Files
Build-System/docs/roadmap/21-expansion-roadmap.md
T
faumaray 8f68ec56e9
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 24s
feat(registry): add a binary-variant listing endpoint
2026-12-03 23:18:41 +03:00

14 KiB
Raw Blame History

21 — Post-v1 Expansion Roadmap

Status: Active execution guide (Plans 01–19, Plan 20 Slices 1–2C, Track A [A1–A3], Track B [B1–B3, except live conan CLI container], Track E1, and Track E3 IDE config/query tooling are implemented and verified; Track D1/D2 are implemented and verified in Docker GCC 16 (D1 cross-build-directory 100% cache hit; D2 5,001-file warm no-op 374 ms); Track E2 (workspace.cpp) is implemented and verified in Docker GCC 16; Track D3 SBOM emission is implemented (Ed25519 signing pending Void/Library#36); Track C (beyond the Linux backend split), Track E3 build-serving daemon/editor extensions, Track E4, and live conan CLI verification remain planned; see STATE and VERIFICATION).

This roadmap defines five orthogonal expansion tracks for taking VoidBuildSystem from a verified self-hosting Linux C++26 build system into a multi-platform, distributed, daily-driver ecosystem. Each track preserves core architectural invariants: ordinary C++ descriptions, hermetic content-verified snapshots, isolated profiles, immutable CAS publication, and explicit diagnostics over silent approximation.

flowchart LR
    V1["Verified Core (Plans 01–19 + Plan 20 Slice 1/2A)"]
    V1 --> TA["Track A: Full Zero-CMake Self-Host"]
    V1 --> TB["Track B: Foreign Translation (2B/2C)"]
    V1 --> TC["Track C: Cross-Platform & Cross-Compile"]
    V1 --> TD["Track D: Remote Cache & Attestations"]
    V1 --> TE["Track E: Workspaces, Daemon & DX"]

Track A — Full Zero-CMake Self-Hosting & Native Test Suite (Implemented & Verified in Wave 9)

Goal: Make VoidBuildSystem build VoidLibrary and all of its own binaries and full test suites purely via vbs test without invoking CMake at all.

Phase Concrete Scope Acceptance Gate / Status
A1 — Native Dependency Provider & Zero-CMake build.cpp Support builder == "native" directly in Provider.cpp (both pure build.cpp subprojects and built-in VoidLibrary recipe) and switch root build.cpp from .cmake(...) to .native_builder(...). Verified: Stage 2 builds VoidLibrary natively (27 actions) + VBS with trapped cmake on PATH; FullV1Tests verifies pure build.cpp subproject dependencies.
A2 — Full VOID_TEST (VL-009) Suite Migration Port all 40 existing cases (plus Wave 9 tests) across tests/*.cpp to VOID_TEST(Suite, name), remove VoidTestScanner.cmake from CMake, and declare vbs_benchmarks + all 5 test binaries alongside vbs_self_smoke in root build.cpp. Verified: All 6 test targets (vbs_self_smoke, vbs_sdk_tests, vbs_core_tests, vbs_v1_tests, vbs_registry_tests, vbs_selfhost_tests) build and pass directly via vbs test.
A3 — Reproducible Stage 2 == Stage 3 Bit-Identical Bootstrap Remove $BUILD_DIR from BootstrapConfig.hpp (binary_dir = "" with /proc/self/exe sibling resolution), map profile_build_dir to /vbs-build, emit GCC -frandom-seed=<filename>, and set TZ=UTC / LC_ALL=C on links. Verified: sha256(stage2/vbs) == sha256(stage3/vbs) (9280ea99...) + librepro_lib.a/repro_app equivalence across clean build directories with trapped cmake.

Track B — Foreign Build Translation Expansion (Plan 20 Slices 2B & 2C) (Implemented & Verified in Wave 10; live conan container pending)

Goal: Expand bounded native translation beyond single-config C++ libraries/executables while never silently dropping unsupported rules.

Phase Concrete Scope Acceptance Gate / Status
B1 — Native C Compiler Driver (C + Mixed C/C++) Extended ToolchainCapabilities with c_compiler (gcc/clang), C standard flags (c11/c17/c23), PerFileOption CompDB projection, and multi-compile-group lowering in Graph.cpp + Translator.cpp. Verified: Pure VBS C17+C++23, CMake C11+C++20, and Meson C17+C++20 mixed fixtures translate and execute natively (FullV1Tests.cpp).
B2 — Bounded build.ninja Custom-Command Translation Shared build.ninja CUSTOM_COMMAND / phony parser lowering hermetic add_custom_command, UTILITY, and Meson custom_target/generated_sources into VBS ActionKind::Custom nodes, strictly rejecting console pools, .util-only side-effects, out-of-tree writes, and run targets. Verified: Generated-header + generated-source CMake and Meson fixtures execute natively under RequireNative, while unsafe constructs reject cleanly (FullV1Tests.cpp).
B3 — Foreign C++20 CXX_MODULES Translation & Conan2 Binary Adapter Lowered CMake CXX_MODULES fileSets onto VBS's P1689 scanner + ModuleBmi pipeline (with default_include_dirs NixOS clang-scan-deps support) plus cross-target/imported module_bmis propagation; Conan2 adapter enforces explicit prerequisite checks. Verified on GCC 16 & Clang 23: Foreign CMake C++20 module library + consumer VBS cross-target import pass on both toolchains; live conan container verification remains pending.

Track C — Cross-Platform Portability & Cross-Compilation (Plan 20 Slice 3)

Goal: Bring Linux-grade process supervision, filesystem atomicity, and toolchain probing to macOS and Windows without weakening invariants.

Phase Concrete Scope Acceptance Gate
C1 — Platform Backend Split (Linux backend split implemented; macOS/Windows pending) Split src/Platform/ into Linux/, MacOS/, and Windows/ behind clean interfaces (FileOps, ProcessSupervisor, DirectoryWatcher), delegating to Void::System as upstream adds OS backends. Linux implementations now live under src/Platform/Linux/ and src/Watch/Linux/ (inotify watcher) with an explicit HostOs/host_supported() boundary in include/Void/Build/Platform/Host.hpp; macOS/Windows backends await real hosts. Zero Linux regressions; clean platform abstraction boundary.
C2 — macOS / Apple Clang & ld64 Apple Clang toolchain probes, .dylib + @rpath/@loader_path install-name lowering, FSEvents watcher, Mach-O deterministic timestamps. Real macOS CI runner passing all SDK, core, module, and install tests.
C3 — Windows / MSVC & clang-cl MSVC (cl.exe, lib.exe, link.exe, /showIncludes, .pdb, /FS, .dll/.lib import libraries), Job Object process-tree kill, ReadDirectoryChangesW watcher, case-insensitive path conflict detection. Real Windows CI runner passing process-tree kill, header-shadowing, and install relocation tests.
C4 — True Host-vs-Target Cross-Compilation Dual-context evaluation (host profile for code generators and build_dependency tools vs target profile for cross-compiled products), sysroot & --target= triple propagation. linux-x86_64 host cross-compiling linux-aarch64 fixture while executing host-compiled generator natively.

Track D — Distributed Caching, Remote Execution & Supply-Chain Security

Goal: Enable CI/team-wide action reuse and verifiable provenance without compromising local hermeticity.

Phase Concrete Scope Acceptance Gate
D1 — Shared HTTP Content-Addressed Action Cache (CAS) (verified: cross-build-directory 100% cache hit) Push/pull action records and output blobs (PUT/GET /api/v1/cas/blobs/{sha256}, /api/v1/cas/actions/{action_key}) against vbs-registry or any compatible HTTP CAS server with bearer auth and digest verification on every read. Action keys are normalized to be build-directory independent; vbs build/test --remote-cache URL [--remote-cache-token-env VAR] (or VBS_REMOTE_CACHE / VBS_REMOTE_CACHE_TOKEN). Cold CI build populates remote CAS; second clean machine achieves 100% cache hit with verified SHA-256 outputs.
D2 — Fast Hashing & Parallel Snapshot Pipeline (verified: 5,001-file warm no-op 374 ms) Adopt Void::Crypto BLAKE2b / hardware-accelerated SHA-256 (when available) + parallel snapshot hashing across Void::Concurrency::ThreadPool + optional Void::Sqlite indexed state store for >10k-file monorepos. Snapshot capture revalidation now hashes on a bounded thread pool for trees of 32+ files. Sub-second warm no-op on 5,000-file synthetic benchmark fixture (vbs_benchmarks).
D3 — Supply-Chain Provenance & Signed Packages (SBOM, Ed25519 signing primitives, and trusted-key enforcement implemented; OpenSSL or the built-in Ed25519 backend) Emit SPDX/CycloneDX SBOM JSON from vbs.lock + BuildGraph (vbs build/test --sbom FILE --sbom-format spdx|cyclonedx, src/Provenance/Sbom.cpp); Ed25519 detached-signature primitives in Void::Build::Provenance::Signing (include/Void/Build/Provenance/Signing.hpp, src/Provenance/Signing.cpp): 0600 seed generation, public-key derivation, canonical vbs-package-v1 package message, and sign/verify; package signature/public-key metadata persisted in vbs.lock and registry releases; vbs publish --signing-key FILE; vbs build|test --trusted-public-key HEX enforced before extraction via Provenance::verify_trusted_package_signature (include/Void/Build/Provenance/Verification.hpp); trusted keys can also come from --trusted-key-file, a project vbs.keys ring, or VBS_TRUSTED_PUBLIC_KEYS (Provenance::load_trusted_keys); prebuilt binary variants carry optional signatures verified by select_compatible_signed_binary over the canonical vbs-binary-v1 message, materialize_binary_variant downloads digest-verified artifacts with cached-digest revalidation, vbs-registry stores/serves per-release binary variants with optional signature metadata and CSRF-protected yank (the client never selects yanked variants), vbs publish-binary publishes signed variants through RegistryClient, `vbs binaries list fetchinspects and downloads them via a dedicatedGET .../binaries` listing endpoint (with bearer auth for private artifacts; yanked variants are marked in listings but never selected).

Track E — Developer Experience, Workspaces & Ecosystem

Goal: Make VBS effortless for multi-package teams, editors, and everyday C++ workflows.

Phase Concrete Scope Acceptance Gate
E1 — Everyday CLI Ergonomics (Implemented in Wave 8) vbs init project scaffolding, vbs clean, vbs doctor environment diagnostics, `vbs graph --format dot json, and vbs build --native-foreign`.
E2 — Multi-Package Workspaces (workspace.cpp) (verified in Docker GCC 16) Shared root vbs.lock and build/.vbs CAS, workspace_dependency() cross-member native linking, and affected-member selection (vbs build/test --member <pkg> / --changed-since <ref>). 3-package workspace fixture (shared library + app + tests) builds/tests with one root lockfile; member selection and --changed-since verified in FullV1Tests.workspace_members_shared_build_and_member_selection.
E3 — IDE Config/Query & Background Daemon build.cpp/build.profiles.cpp/build-support/ SDK entries in compile_commands.json + vbs ide generate (.clangd, .vscode/, .zed/, .idea/customTargets.xml) & vbs ide query (Implemented & Verified in Wave 10); Unix-socket daemon core holding a warm StateStore + project DirectoryWatcher with vbs daemon run|status|stop|gc|recover|describe (Implemented & Verified in Wave 14; bounded describe added in the post-v1 daemon follow-up). describe returns a bounded graph summary (target_names ≤ 128 entries × 200 bytes, profile ≤ 128 bytes, 10 s evaluation timeout); vbs daemon build executes the lowered graph in-process against the warm state store with bounded profile/targets/jobs, including daemon-side dependency resolution/materialization and provider import via Package::resolve_and_materialize_dependencies; vbs daemon ide query publishes/selects the profile compilation database and serves the IDE workspace/target metadata JSON over the socket, vbs daemon compdb export returns the published compilation-database path and entry count, vbs daemon ide generate writes the editor presets over the socket, vbs daemon ide poll exposes a bounded editor-extension watch protocol (changed paths, sequence, overflow state), vbs daemon ide wait adds a bounded long-poll variant, vbs daemon ide status reports the active editor selection and compdb state, vbs daemon compdb use switches the active editor profile under the selection lock, vbs daemon graph exports the target dependency graph (DOT/JSON), vbs daemon test builds and runs declared test targets, and vbs daemon compdb entries serves bounded per-file compile arguments to editor extensions. Daemon workspace support describes members, builds all members in order (or a selected member) with the shared root lock, and serves member-scoped IDE query/generate/compdb requests via --member. Dedicated editor extensions remain planned. vbs ide & build.cpp syntax-check verified in FullV1Tests.cpp; daemon lifecycle/status/gc/shutdown/describe verified in DaemonTests.cpp (6/6 under dev cpp-gcc); the live vbs daemon describe CLI round-trip is verified in vbs_cli_contract.
E4 — Transport & Storage Upstream Alignment Adopt Void::Net (VL-004/VL-005) and Void::Sqlite (VL-011b) when lightweight/bundled builds become available in minimal Nix toolchains, reducing VBS transport code further. All vbs_registry_tests and vbs_core_tests pass on both minimal and full toolchains.

  1. Track D1 + D2 (highest leverage next): shared HTTP CAS cache on vbs-registry + parallel snapshot hashing for large repos.
  2. Track E2: multi-package workspace.cpp support with shared lockfile and CAS.
  3. Track E3 (vbs daemon) + Track E4: persistent local background daemon and Void::Net/Void::Sqlite alignment once optional system deps are bundled.
  4. Track C1–C4 + live conan container: macOS / Windows platform ports + dual-profile cross-compilation once host CI runners are provisioned.