111 lines
8.6 KiB
Markdown
111 lines
8.6 KiB
Markdown
# 22 — Superiority roadmap: gaps toward replacing CMake, Meson and build2
|
||
|
||
Status: **analysis plan (2026-12-05)**. This plan records what is still missing after Plans 01–21 and the post-v1 expansion, and the path to a *superior* replacement of CMake, Meson and build2.
|
||
Sources: [REQUIREMENTS](REQUIREMENTS.md), [ARCHITECTURE](ARCHITECTURE.md), [01–21 plans](README.md), [STATE](../agent-workflow/STATE.md), [VERIFICATION](../agent-workflow/VERIFICATION.md), live CMake/Meson documentation via Context7, and this session's observed results.
|
||
build2 documentation was **not** available through Context7; build2 statements below are general knowledge and are marked *(unverified)*.
|
||
|
||
## 1. Current gap inventory
|
||
|
||
| Area | Status | Evidence / note |
|
||
| --- | --- | --- |
|
||
| Track C2 macOS / Apple Clang / `ld64` | **Deferred (dropped for now)** | no macOS host; decided 2026-12-05 |
|
||
| Track C3 Windows / MSVC | **Redesigned: Wine-first** | see §2; native MSVC host is Track C3-native, deferred |
|
||
| Track C4 host-vs-target cross-compilation | **Required by the Wine strategy** | host profile for generators, target profile for products |
|
||
| Dedicated editor plugins (VS Code, Zed, CLion…) | Open | daemon editor protocol is implemented; plugins live in external repos |
|
||
| Remote / distributed execution workers | Deferred | `20`, R-015 |
|
||
| VoidLibrary's own `build.cpp` | Open | `recipes/VoidLibrary/` builds it inside VBS, but VoidLibrary is not yet migrated |
|
||
| Installer generators | Partial | deterministic tar + self-extracting `sh` + SBOM + Ed25519; DEB/RPM/MSI/DMG-style generators missing |
|
||
| Test-runner parity | Partial | `VOID_TEST` runner; fixtures/labels/locks/timeouts/JUnit incomplete |
|
||
| IDE ecosystem | Partial | `vbs ide` + CompDB + daemon protocol; no File API shim, presets import, or plugins |
|
||
| CI on real runners, sanitizers, fuzzing | Unverified | the GitHub Actions workflow is a template that has never run |
|
||
|
||
## 2. Platform strategy (revised 2026-12-05)
|
||
|
||
- **macOS: dropped for now.** No macOS host is available; Track C2 stays documented but unscheduled.
|
||
- **Windows: Wine-first.**
|
||
- Cross-compile to `x86_64-w64-mingw32` with MinGW-w64 GCC 16.2 from
|
||
`dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc`.
|
||
- Run produced PE binaries and Windows-only tools under Wine 11 from
|
||
`dev cpp-gcc -p wine64`.
|
||
- This exercises the host/target split (Track C4): a Linux **host** profile builds code
|
||
generators, a Windows **target** profile builds products, and tests execute under Wine.
|
||
- **Native MSVC / clang-cl host support is deferred** (Track C3-native) until a real Windows
|
||
host exists.
|
||
|
||
Status 2026-12-05: items 1-3 below are **implemented** (`--target-os windows --target-arch x86_64`, MinGW-w64 discovery, `.exe`/`.dll` naming, Wine test runner) and verified by `FullV1Tests.track_c_windows_target_cross_build_and_wine_test`; item 4 (path/case-sensitivity validation under Wine) is also implemented: Windows-target lowering rejects case-only output collisions and reserved device names, and the Wine regression test proves case-insensitive file semantics.
|
||
|
||
Concrete work this implies:
|
||
1. Toolchain driver discovers `x86_64-w64-mingw32-{gcc,g++,ar,windres}` and records
|
||
`target_triple`, PE artifact naming (`.exe`, `.dll`, `.a`/`.lib`, import libraries).
|
||
2. Profile/target context carries the Windows target (`os=Windows`, `architecture=x86_64`) while
|
||
the host stays Linux.
|
||
3. Test execution uses a configurable runner prefix (`wine`, or `wine64`) when the target is
|
||
Windows and the host is not.
|
||
4. Path and case-sensitivity tests run against Wine to validate Windows semantics without a
|
||
Windows host.
|
||
|
||
## 3. Parity roadmap against the incumbents
|
||
|
||
| Capability | CMake | Meson | build2 *(unverified)* | VBS now | Planned work |
|
||
| --- | --- | --- | --- | --- | --- |
|
||
| Platforms | Windows, macOS, Linux, BSD, cross | same | same | Linux | Wine-first Windows (§2); macOS deferred |
|
||
| Languages | C, C++, CUDA, Fortran, ObjC, ASM, HIP… | C, C++, Rust, D, Fortran, Java… | C/C++ focused | C, C++ | ASM/CUDA/ObjC or a documented extension API |
|
||
| Toolchains | MSVC, clang-cl, GCC, Clang, Apple, many | GCC, Clang, MSVC, many | GCC, Clang, MSVC | GCC, Clang (Linux) | MinGW target; MSVC deferred |
|
||
| Package/registry | External (vcpkg, Conan, FetchContent) | wrapdb, subprojects | cppget.org / brep | **Built-in registry + solver + lock + binary variants + signatures + SBOM** | federation, mirrors, key distribution |
|
||
| Install/package | `install()`, `install(EXPORT)`, CPack (TGZ/ZIP/DEB/RPM/WIX/DMG/NuGet/APK…) | `install_data`, `install_headers`, dist scripts | install module | prefix staging, components, relocatable CMake + native exports, tar, self-extracting `sh`, **stored ZIP**, **DEB (dpkg-validated)**, SBOM, **Ed25519-signed archives with checksums** | RPM, MSI/DMG-style |
|
||
| IDE integration | File API, presets, every IDE | `meson-info` introspection | limited | `vbs ide generate/query`, CompDB, daemon protocol | File API shim, `CMakePresets.json` import, plugins |
|
||
| Test runner | CTest: fixtures, labels, resource locks, timeouts, JUnit/CDash | `meson test`: suites, timeouts, JUnit | test module | `VOID_TEST` runner; `vbs test --junit --test-timeout` | fixtures, labels, resource locks, CDash |
|
||
| Incremental / cache | compiler depfiles, ccache external | depfiles, ccache | internal caching model | **content-addressed state, immutable snapshots, remote action cache** | scale benchmarks |
|
||
| Modules / PCH / unity / LTO / sanitizers | yes (with generator quirks) | yes | yes | **native with capability probing** | more compilers |
|
||
| Reproducibility | opt-in | opt-in | partial | **default deterministic** (epoch, prefix maps, canonical mtimes) | cross-platform determinism |
|
||
| Generators/backends | Ninja, Makefiles, VS, Xcode… | Ninja (+ others historically) | own scheduler | **direct executor (no generator)** | n/a |
|
||
| Remote execution | rare (via add-ons) | rare | rare | planned | workers after local engine |
|
||
|
||
## 4. Differentiators to preserve
|
||
|
||
1. Ordinary compiled C++ descriptions instead of a DSL (CMake language, Meson DSL, build2 `bsl`).
|
||
2. Hermetic immutable snapshots and content-addressed inputs.
|
||
3. Built-in CAS with remote action cache and profile isolation.
|
||
4. Deterministic-by-default outputs (proven bit-identical Stage 2 == Stage 3).
|
||
5. Native foreign-graph translation (CMake/Meson → native actions), not just delegation.
|
||
6. Integrated package manager, registry (RBAC, signatures, SBOM, binary variants).
|
||
7. First-class modules/header units/PCH/unity/LTO/sanitizers with real capability probes.
|
||
8. Daemon + editor protocol built in.
|
||
9. One tool covers build, deps, registry, install, packaging, provenance.
|
||
|
||
## 5. Prioritized execution order
|
||
|
||
1. Documentation drift: status tables must match verified reality (this plan updates them).
|
||
2. Wine-first Windows target support (§2).
|
||
3. Packaging parity: ZIP (stored), DEB, RPM, metadata, signing (`--archive-format` extensions).
|
||
4. IDE ecosystem: File API shim (**done**: `vbs ide generate` emits codemodel-v2), presets import (**done**: `vbs presets`), external plugins.
|
||
5. Migration tooling (`vbs migrate`) and migrating VoidLibrary onto VBS (**trial verified**: VoidLibrary builds and tests with VBS in a separate clone; upstream #61 tracks the in-repo build description).
|
||
6. Test-runner parity.
|
||
7. Benchmarks against CMake/Meson/build2 on documented fixtures (including 10k-target scaling).
|
||
8. CI on real runners, sanitizer jobs, parser fuzzing.
|
||
9. Remote execution workers.
|
||
|
||
## 6. Observed baseline (2026-12-05, x86_64, GCC 16.2, Debug, `benchmarks/compare.sh 20`)
|
||
|
||
20 generated sources, 32 cores, wall-clock milliseconds:
|
||
|
||
| Tool | cold | warm/no-op |
|
||
| --- | --- | --- |
|
||
| VBS (`vbs build`) | 2578 | 209 |
|
||
| CMake + Ninja (configure / build) | 234 (configure) | 98 cold build, 9 warm |
|
||
| Meson (`setup` / `compile`) | 438 (setup) | 232 cold, 166 warm |
|
||
|
||
Interpretation: for a tiny project VBS pays for descriptor compilation, snapshot capture and
|
||
toolchain probing on every CI invocation, so its cold and warm times are higher than Ninja's
|
||
no-op. This is the clear performance target: cache the compiled descriptor and toolchain probe
|
||
across invocations, and keep snapshot work proportional to changed files. Larger fixtures are
|
||
needed before drawing scaling conclusions.
|
||
|
||
## 7. Acceptance gates
|
||
|
||
- Every platform claim has an observed run on that platform (or under Wine, clearly labelled).
|
||
- A package generator is accepted only when its output installs and runs from a clean machine image.
|
||
- Parity rows move to "done" only with tests in the repo suite, not from planning alone.
|
||
- Superiority claims require measured comparisons against the incumbent on the same fixture and
|
||
toolchain; until then they stay listed as design advantages.
|