# wefti technical reference > Technical reference for `wefti` (Wefti, pronounced WEF-tee, `/ˈwɛfti/`) 0.4.0, an independent Rust implementation of CMake 4.5.1. The benchmark and compatibility figures below come from the release receipts. The canonical website is https://wefti.dev/ and the GitHub repository is https://github.com/wefti/wefti. The browser playground lives at https://wefti.dev/playground.html, the compatibility report lives at https://wefti.dev/dashboard.html with its machine-readable dataset at https://wefti.dev/data/latest.json, and the concise index lives at https://wefti.dev/llms.txt. ## Verified v0.4.0 benchmark and parity summary [Frozen compatibility results](https://raw.githubusercontent.com/wefti/wefti/f98ed6c08e8137b35d5572f39bdce8915c55cd62/site/data/latest.json) and [frozen timing data](https://raw.githubusercontent.com/wefti/wefti/f98ed6c08e8137b35d5572f39bdce8915c55cd62/site/data/benchmarks-0.4.0.json). The scorecard records the frozen source commit `a9c2289f20dd0cbb4bc6bca880a61e439b37cd8c` on 2026-12-04. All comparisons use CMake 4.5.1. - CI and corpus smoke passed 6 of 6 jobs across macOS, Linux, and Windows. - In Tests/RunCMake, Wefti passed all 27,953 cases across all 1,099 targeted suites. The v0.3.1 release passed 27,952 of 27,953 cases. - Wefti passed 62 of 62 core suites with 10,695 cases and 35 of 35 policy suites with 1,208 cases (CMP0066 to CMP0226). - Wefti passed all 20 independent black-box scenarios and all 679 checks. All 10 large C++ projects passed strict L1 configure parity and L2 Ninja dry-run parity. - The vcpkg run matched all 1,518 scored CMake ports with zero mismatches. It inspected all 2,621 expected ports across 64 shards. Wefti completed 1,826 installs. CMake completed 1,818. The run observed no CMake configure for 438 ports. CMake failed before configure for 665 ports. - Configure succeeded for 76 of 78 eligible repositories (97.44%) in the sealed set of 240 repositories. Strict L1 configure parity passed on 72 of 77 eligible repositories (93.51%). In v0.3.1, 51 of 74 passed (68.92%). The strict L1 comparison excluded 163 repositories. The run recorded zero find-module failures. - The sealed holdout reports these categories and counts: oracle-red 152, clone-timeout 9, configure 2, generator 2, timeout 1, oracle-unstable 1, and source 1. - Wefti passed both Conan scenarios. On macOS arm64, 34 cross-toolchain cases passed and CMake confirmed four expected rejections. All 38 available cases matched. Four of the 42 cases were unavailable. - Seeded fuzzing ran 14,000,000 inputs across 14 targets with zero failures. Differential fuzzing passed all 1,000 cases with zero mismatches and zero oracle errors. - The probe cache passed all 16 checks. Mutation replay passed all 20 checks. WebAssembly and WASI passed all six checks. The determinism check passed, and the silent PATH swap found zero differences. - Wefti was faster than CMake 4.5.1 in 37 of 40 matched workloads. The tests ran on an Apple M1 with 16 GiB of memory, macOS, and AC power. Speedups ranged from 0.97x to 138.17x. The three cold runs where Wefti took longer were 100 targets (0.99x), nlohmann/json (0.97x), and Protobuf (0.99x). - Cold configure for 500 targets took 1,865.9 ms with Wefti and 2,676.5 ms with CMake (1.43x). An unchanged repeat took 17.2 ms and 2,376.6 ms (138.17x). - A new tree with a shared probe cache took 468.3 ms with Wefti and 3,417.6 ms with CMake (7.30x). A leaf edit took Wefti 58.3 ms at the median and 58.6 ms at the 95th percentile. The CMake median was 136.1 ms (2.34x). - On DuckDB, OpenCV, Protobuf, Qt Base, and LLVM, geometric mean speedups were 1.31x cold, 2.21x with a warm probe cache, and 2.24x after a leaf edit. - The macOS arm64 executable is 18,352,560 bytes (17.50 MiB). It is 0.89 MiB smaller than the v0.3.1 executable of 19,286,032 bytes (18.39 MiB). Its SHA-256 is `7beab5799377c5d715f08ebcaaf59b57f22b4b5f9aa52c249e9dc4c6bb3be3a6`. The macOS arm64 release archive SHA-256 is `0666473bb24a86029f71a33d44b85240c7fa47474d258a06556e505ead3746ce`. - The browser WebAssembly file is 6,653,960 bytes (6.35 MiB). Gzip level 9 reduces it to 2,591,802 bytes (2.47 MiB). | Platform | Suites passed | Cases passed | Pass rate | | --- | --- | --- | --- | | macOS arm64 | 371 / 371 | 9,706 / 9,706 | 100.00% | | Linux x86_64 | 362 / 362 | 9,373 / 9,373 | 100.00% | | Windows x86_64 | 366 / 366 | 8,874 / 8,874 | 100.00% | | Total | 1,099 / 1,099 | 27,953 / 27,953 | 100.00% | Windows ran across six shards. `FindPkgConfig` runs only on POSIX systems. Speedup is the CMake median wall time divided by the Wefti median wall time. Peak resident set size (RSS) measures the largest amount of memory in use. LLVM had the highest peaks. Wefti used 341.05 MiB and CMake used 391.14 MiB. The peaks for the tool processes alone were 273.89 MiB and 325.74 MiB. | Workload | wefti (ms) | CMake 4.5.1 (ms) | Speedup | wefti peak RSS (MiB) | CMake peak RSS (MiB) | | --- | --- | --- | --- | --- | --- | | DuckDB v1.3.2 (Cold) | 1902.09 | 2894.61 | 1.52x | 61.55 | 66.73 | | DuckDB v1.3.2 (Warm probe cache) | 1374.03 | 3258.39 | 2.37x | 56.20 | 66.73 | | DuckDB v1.3.2 (Leaf edit) | 413.44 | 2248.50 | 5.44x | 49.05 | 62.55 | | OpenCV 4.12.0 (Cold) | 14191.66 | 24736.21 | 1.74x | 180.16 | 179.41 | | OpenCV 4.12.0 (Warm probe cache) | 5854.66 | 22568.79 | 3.85x | 179.38 | 179.39 | | OpenCV 4.12.0 (Leaf edit) | 1440.53 | 1634.91 | 1.13x | 179.41 | 179.80 | | Protobuf v36.2 (Cold) | 1234.14 | 1217.20 | 0.99x | 52.19 | 43.70 | | Protobuf v36.2 (Warm probe cache) | 566.87 | 1231.78 | 2.17x | 49.17 | 43.78 | | Protobuf v36.2 (Leaf edit) | 110.40 | 215.19 | 1.95x | 37.17 | 23.27 | | Qt Base v6.8.3 (Cold) | 17279.47 | 21421.15 | 1.24x | 223.64 | 240.30 | | Qt Base v6.8.3 (Warm probe cache) | 13314.26 | 21039.57 | 1.58x | 213.69 | 237.81 | | Qt Base v6.8.3 (Leaf edit) | 4111.14 | 10138.75 | 2.47x | 206.00 | 228.09 | | LLVM llvmorg-20.1.8 (Cold) | 17411.91 | 20859.07 | 1.20x | 341.05 | 391.14 | | LLVM llvmorg-20.1.8 (Warm probe cache) | 12351.04 | 20838.53 | 1.69x | 337.39 | 390.98 | | LLVM llvmorg-20.1.8 (Leaf edit) | 3158.58 | 6003.05 | 1.90x | 310.39 | 381.05 | Selected synthetic and small-project configure runs | Workload | wefti (ms) | CMake 4.5.1 (ms) | Speedup | wefti peak RSS (MiB) | CMake peak RSS (MiB) | | --- | --- | --- | --- | --- | --- | | corpus zlib 1.3.1 (cold) | 746.25 | 1011.60 | 1.36x | 41.50 | 35.90 | | corpus fmt 11.2.0 (cold) | 744.43 | 804.49 | 1.08x | 38.00 | 37.90 | | corpus nlohmann/json 3.12.0 (cold) | 448.22 | 435.27 | 0.97x | 37.80 | 37.90 | | configure 100 targets (cold) | 449.38 | 445.23 | 0.99x | 36.00 | 35.90 | | configure 100 targets (warm) | 13.99 | 159.11 | 11.37x | 10.30 | 22.60 | | configure 500 targets (cold) | 1865.90 | 2676.51 | 1.43x | 146.20 | 112.80 | | configure 500 targets (warm) | 17.20 | 2376.55 | 138.17x | 10.50 | 113.30 | | synthetic (cold configure) | 2896.72 | 3539.58 | 1.22x | 36.86 | 36.23 | | synthetic (warm probe-cache configure) | 468.31 | 3417.55 | 7.30x | 35.84 | 36.09 | | synthetic (incremental-leaf) | 58.26 | 136.05 | 2.34x | 21.09 | 21.11 | | Local FetchContent (cold FetchContent configure) | 294.55 | 353.17 | 1.20x | 27.05 | 27.05 | | Local FetchContent (warm-fetch) | 148.50 | 254.95 | 1.72x | 19.27 | 15.73 | See the [full benchmark tables](https://wefti.dev/benchmarks.html), [release scorecard](https://wefti.dev/data/latest.json), and [evaluation and configure results](https://wefti.dev/data/benchmarks-0.4.0.json) for all workloads and reproduction steps. ## Peer build tool benchmark The peer benchmark generated Ninja files for 100 and 500 targets. Each time cell shows the median and the 95th percentile in milliseconds over five runs. The leaf edit changes a compiler definition. Only Wefti and CMake read `CMakeLists.txt`. GN was unavailable. The run recorded zero load warnings. Premake5 generates files without probing the compiler. Peak RSS is for the largest single process during a cold configure. ### 100 targets | Tool | Version | Reads CMakeLists.txt | Cold configure | Warm configure | Leaf reconfigure | Peak RSS (MiB) | Binary (MiB) | Install (MiB) | |---|---|---|---:|---:|---:|---:|---:|---:| | Wefti | 0.4.0 | yes | 637.2 / 727.2 | 277.3 / 311.8 | 62.1 / 67.3 | 37.9 | 17.50 | 25.74 | | CMake | 4.5.1 | yes | 646.3 / 713.2 | 604.4 / 646.5 | 159.2 / 178.4 | 37.8 | 26.74 | 250.62 | | Meson | 1.12.1 | no | 1174.2 / 1287.5 | 1198.6 / 1271.7 | 414.3 / 432.1 | 50.1 | 5.63 | 91.15 | | Muon | 0.7.1 | no | 230.9 / 349.5 | 232.3 / 274.7 | 49.5 / 49.9 | 36.9 | 1.10 | 3.06 | | XMake | 3.1.2+20261016 | no | 1604.8 / 1726.8 | 1604.1 / 1609.1 | 1596.7 / 1609.2 | 44.8 | 0.68 | 7.92 | | Premake5 | 5.0.0 | no | 196.6 / 196.6 | 195.6 / 199.3 | 187.2 / 194.9 | 21.3 | 1.42 | 1.50 | | GN | Unavailable | no | n/a | n/a | n/a | n/a | n/a | n/a | ### 500 targets | Tool | Version | Reads CMakeLists.txt | Cold configure | Warm configure | Leaf reconfigure | Peak RSS (MiB) | Binary (MiB) | Install (MiB) | |---|---|---|---:|---:|---:|---:|---:|---:| | Wefti | 0.4.0 | yes | 1109.1 / 1385.5 | 789.3 / 876.0 | 219.6 / 231.1 | 66.7 | 17.50 | 25.74 | | CMake | 4.5.1 | yes | 1140.7 / 1220.9 | 1156.0 / 1219.1 | 565.6 / 596.1 | 82.3 | 26.74 | 250.62 | | Meson | 1.12.1 | no | 1650.8 / 1795.6 | 1644.9 / 1661.0 | 829.8 / 865.8 | 64.5 | 5.63 | 91.15 | | Muon | 0.7.1 | no | 423.0 / 505.4 | 417.0 / 422.6 | 210.8 / 225.6 | 37.1 | 1.10 | 3.06 | | XMake | 3.1.2+20261016 | no | 3516.7 / 3584.3 | 3484.0 / 3609.0 | 3483.9 / 3532.4 | 105.0 | 0.68 | 7.92 | | Premake5 | 5.0.0 | no | 1044.8 / 1098.0 | 1049.8 / 1167.7 | 952.3 / 966.2 | 61.2 | 1.42 | 1.50 | | GN | Unavailable | no | n/a | n/a | n/a | n/a | n/a | n/a | Reproduce the peer benchmark with `python3 tools/measure/bench_alternatives.py --targets 100,500 --runs 5`. ## wefti vs CMake, Meson, Bazel, Xmake, and Ninja - wefti and CMake configure projects from `CMakeLists.txt` and CMake presets. Use wefti to keep those files and measure native configure speed. Use upstream CMake when your project requires an omitted feature. - Meson uses `meson.build` and can use some CMake dependencies and subprojects. Bazel uses `BUILD` files and Starlark rules. It supports remote caching and execution for build actions. The peer benchmark includes Meson configure times. - Xmake describes projects in `xmake.lua`, has a built-in package repository (`xmake-repo`), and can use vcpkg and Conan packages. It builds projects itself and can generate files for other tools. A move from CMake requires `xmake.lua` definitions. The peer benchmark includes XMake configure times. - Ninja reads generated build rules and runs the build. wefti generates those rules when you select the Ninja generator. ## Guides Use [cmake-rs](https://github.com/rust-lang/cmake-rs) to call CMake from Cargo. Use [Corrosion](https://github.com/corrosion-rs/corrosion) to build Rust from CMake. Wefti supplies a CMake executable written in Rust. - [Overview](https://wefti.dev/) - [Better CMake](https://wefti.dev/better-cmake.html) - [CMake replacement](https://wefti.dev/cmake-replacement.html) - [Faster CMake](https://wefti.dev/faster-cmake.html) - [Best CMake alternative](https://wefti.dev/best-cmake-alternative.html) - [Compare](https://wefti.dev/cmake-vs-wefti.html) - [CMake LSP](https://wefti.dev/cmake-lsp.html) - [CMake linter and formatter](https://wefti.dev/cmake-linter-formatter.html) - [Debug CMake](https://wefti.dev/debug-cmake.html) - [CI cache](https://wefti.dev/cmake-ci-cache.html) - [Migrate from CMake](https://wefti.dev/migrate-from-cmake.html) - [CMake vs Meson](https://wefti.dev/cmake-vs-meson.html) - [CMake vs Bazel](https://wefti.dev/cmake-vs-bazel.html) - [CMake vs Xmake, Premake, GN, and Muon](https://wefti.dev/cmake-vs-xmake.html) - [cmake-format alternative](https://wefti.dev/cmake-format-alternative.html) - [neocmakelsp alternative](https://wefti.dev/cmake-lsp-neocmakelsp-alternative.html) - [GitHub Actions](https://wefti.dev/cmake-github-actions.html) - [Python extensions](https://wefti.dev/python-scikit-build-cmake.html) - [Slow configure](https://wefti.dev/cmake-slow-configure.html) - [Rust CMake](https://wefti.dev/rust-cmake.html) - [CMake vs Muon and Premake](https://wefti.dev/cmake-vs-muon.html) - [Benchmarks](https://wefti.dev/benchmarks.html) - [Install](https://wefti.dev/install.html) - [Playground](https://wefti.dev/playground.html) - [Compatibility](https://wefti.dev/dashboard.html) - [Facts JSON](https://wefti.dev/data/facts.json) ## Editors and integrations matrix | Name | Kind | How it connects | | --- | --- | --- | | VS Code | Editor | First-party extension in `editors/vscode` | | Cursor | Editor | The same extension package | | Windsurf | Editor | The same extension package | | VSCodium | Editor | The same extension package, not tested separately | | Zed | Editor | First-party extension in `editors/zed` | | Neovim 0.11 and later | Editor | `vim.lsp.config("wefti", ...)` or `editors/neovim/wefti.lua` | | Helix | Editor | `editors/helix/languages.toml` | | Emacs | Editor | Eglot entry for `wefti-lsp` | | Sublime Text | Editor | LSP package client with the `source.cmake` selector | | CLion | Editor | LSP4IJ plugin | | pre-commit | Integration | Hooks `wefti-fmt`, `wefti-fmt-fix`, and `wefti-lint`, from version 0.3.1 | | GitHub Actions | Integration | `wefti/wefti/actions/setup-wefti@v0.4.0` with GitHub Actions Cache v2 | | scikit-build-core | Integration | Runs the `cmake` that it finds. The `wefti-cmake` wheel provides that name | | vcpkg | Integration | Toolchain file, replay and probe cache keep working | | Conan | Integration | `conan_toolchain.cmake` toolchain file | | Homebrew, Scoop, project Nix flake | Public install channels | See the install section | | WinGet | Pending | See channel status on the install page | ## 1. Identity, licensing, and safety boundaries `wefti` contains no copied or translated CMake C++ source code, and the core engine never invokes an upstream `cmake` binary at runtime. One multi-call executable provides `cmake`, `ccmake` on macOS, Linux, and Windows, `ctest`, `cpack`, and the Language Server Protocol server (`wefti-lsp` symlink or `wefti lsp`). An isolated sibling companion binary (`wefti-verify`, built from `crates/wefti-harness`) executes explicit side-by-side comparisons when you invoke `wefti verify`. `wefti` is not affiliated with Kitware, and CMake is a trademark of Kitware, Inc. - 42 of 43 crates forbid `unsafe_code`. The audited Windows process interface in `crates/wefti-winproc/src/ffi.rs` contains the only exception (ADR-056). - Workspace Clippy lints reject `unwrap_used`, `expect_used`, `panic`, `todo`, `unimplemented`, `indexing_slicing`, `string_slice`, `iter_over_hash_type`, and direct `std` filesystem, environment, process, and clock calls in engine crates. - Reachable input paths return structured diagnostics bounded by `wefti_base::Limits` on recursion depth, macro expansion, loops, regular expression steps, and file sizes. - External Rust crates such as `rustix` and `memchr` use `unsafe` internally, and the native binary statically links `zstd` 1.5.7 (`zstd-sys`) and `liblzma` 5.8 (`liblzma-sys`). Gzip uses `flate2` with `miniz_oxide`, and bzip2 uses `libbz2-rs-sys` in Rust. - Rust code in `crates/` and Python tools in `tools/` use `MIT OR Apache-2.0`. Bundled CMake 4.5.1 `Modules/`, `Templates/`, rendered `Help/` files under `modules/cmake-4.5/`, and five derived tables listed in `THIRD_PARTY_NOTICES.md` stay under `BSD-3-Clause` with original Kitware and contributor notices intact. ## 2. Two invocation modes via `argv[0]` `wefti` selects its operating persona from `argv[0]`. - **Compatibility mode (`cmake`, `ccmake`, `ctest`, `cpack`).** Flags, output, diagnostics, and exit codes match CMake 4.5.1, subject to Section 8. Native flags and subcommands are rejected, and no native metadata files are written. - **Native mode (`wefti`).** Enables the persistent probe cache, parallel probes, sound incremental replay, drift checks, multi-config `compile_commands.json`, `explain`, `diff-config`, `fmt`, `lint`, `unused`, `graph`, `verify`, `doctor`, `cache`, `--profile`, `--diagnostics=rich`, `--hermetic`, and `--fetch-lock`. Build-time regenerations of a native build directory preserve the native persona automatically. - **Compatibility override.** Setting `WEFTI_ORACLE_MODE=1` forces compatibility mode even when invoked as `wefti`. - **Probe cache in compatibility mode (ADR-067).** Outside `WEFTI_ORACLE_MODE=1`, `WEFTI_PROBE_CACHE=on`, `1`, or `readwrite` turns on read and write, `readonly` reads only, and `verify` checks each hit against a fresh probe. An unset, `off`, `0`, or unknown value keeps the stateless default, and `WEFTI_NO_PROBE_CACHE=1` and `--no-probe-cache` still turn the cache off. Replay, the Ninja generation skip, the fragment cache, FetchContent lock files, and hermetic checks stay off in compatibility mode. ## 3. CMake 4.5.1 parity scope ### Command-line tools - **`cmake`.** Configure and generate, `-P` scripts, `-E` utilities (`tar`, hashes, `cmake_ninja_dyndep`, Fortran and Qt drivers, capabilities), `--build`, `--install`, `--workflow`, `--find-package`, `--preset`, `--sarif-output`, and `--debugger`, `--debugger-pipe`, and `--debugger-dap-log` Debug Adapter Protocol server over Unix domain sockets on macOS and Linux and named pipes on Windows. `-E capabilities` reports `"debugger": true` on these platforms. - **`ccmake`.** Clean-room safe-Rust interactive terminal cache editor on macOS, Linux, and Windows with no `ncurses` dependency, distinct configure (`c`) and generate (`g`) phases over a retained configure session, captured child output scrollback, and raw-mode restoration on exit. - **`ctest`.** Evaluates `CTestTestfile.cmake` with parallel scheduling, GNU make jobserver access, fixtures, resource specs, labels, repeat modes, JUnit and dashboard XML, `discover_tests()`, and `-S` scripts. - **`cpack`.** Evaluates `CPackConfig.cmake` and writes archives (`TGZ`, `TXZ`, `TZST`, `TBZ2`, `TZ`, `TAR`, `STGZ`, `ZIP`, `7Z`, plus `ZIP_*` and `7Z_*` compression variants), Linux `DEB` and `RPM`, `External`, macOS `Bundle`, `DragNDrop`, and `productbuild`, Windows `WIX` (v3 and v4), and cross-platform `NSIS`, `NSIS64`, and `IFW` (honoring optional `WEFTI_CPACK_TOOL_TIMEOUT`). ### Build system generators | Generator | Generated files | Platforms | Notes | | --- | --- | --- | --- | | `Ninja` | `build.ninja` | macOS, Linux, Windows | Response files, depfiles, `dyndep` for C++20 modules, Swift multi-edge rules | | `Ninja Multi-Config` | `build.ninja`, `build-.ninja` | macOS, Linux, Windows | Per-config build files, `CMAKE_INTDIR`, native multi-config `compile_commands.json` | | `Unix Makefiles` | `Makefile` | macOS, Linux | Recursive Makefiles, header scanning, `--output-sync` | | `NMake Makefiles` | `Makefile` | Windows | Requires Microsoft NMake | | `Xcode` | `project.pbxproj` | macOS | Schemes, workspace settings, XCFramework and Swift rules, `xcodebuild` plan | | `Visual Studio 17 2022` | `.sln`, `.vcxproj`, `.vcxproj.filters` | Windows | Stable GUIDs, MSBuild command plan | | `Visual Studio 18 2026` | `.slnx`, `.vcxproj`, `.vcxproj.filters` | Windows | Stable GUIDs, MSBuild command plan | ### Languages and toolchains - **C and C++.** C90 to C23, standard C++, and C++20 and C++23 named modules via `CXX_MODULES` file sets, P1689r5 depfiles, `CXXDependInfo.json`, `CXXModules.json`, Ninja `dyndep`, and module maps. - **Objective-C and Objective-C++.** Apple frameworks and Mach-O `@rpath` resolution. - **Fortran.** Source scanning for `.mod` files and module dependency collation. - **CUDA.** NVCC and Clang toolkit lowering, architecture policy validation, separable compilation, and explicit device linking. - **HIP.** AMD ROCm `--offload-arch`, SPIR-V, and NVIDIA target lowering with runtime libraries. - **Swift.** `CMP0157` split compilation (`wholemodule`, `singlefile`, `incremental`), `CMP0195`, `CMP0215`, `CMP0216`, output file maps, Ninja multi-edge rules, and Xcode settings. - **Assembly, Windows resources, and Qt.** `ASM`, `ASM_MASM`, `ASM_NASM`, Windows `RC`, and Qt `AUTOMOC`, `AUTOUIC`, and `AUTORCC`. ### Specifications and interfaces - Policies `CMP0000` to `CMP0226`, with `CMP0000` to `CMP0065` always NEW (requiring `CMAKE_POLICY_VERSION_MINIMUM` >= 3.5 for older `cmake_minimum_required` calls) and 161 active policies from `CMP0066` to `CMP0226`. - CMake Presets schema v13 (`CMakePresets.json`, `CMakeUserPresets.json`, `include`, inheritance, conditions, macros). - File API replies for `codemodel` v2.12, `cache` v2, `toolchains` v1, `cmakeFiles` v1, and `configureLog` v1. - Common Package Specification 0.15.0 reading, validation, and writing, SPDX 3.0.1 SBOM via `CMAKE_INSTALL_SBOM_FORMATS`, Instrumentation API v1 (data v1.2), `cmake_diagnostic()`, SARIF 2.1.0 via `--sarif-output`, `compile_commands.json`, `vcpkg`, Conan, `find_package()`, and `FetchContent`. ## 4. Native developer tools and caching in `wefti` mode ### Probe cache, parallel probes, and portable CI archives `wefti` caches verified compiler checks (`try_compile`, `check_c_source_compiles`, `check_include_file`, `check_symbol_exists`) in a content-addressed store (`wefti-store`) shared across build directories and projects. Every probe runs under `JournalHost`, refusing to store impure probes or unmodeled compiler overrides (`CCC_OVERRIDE_OPTIONS`, `COMPILER_PATH`, `GCC_EXEC_PREFIX`, `LD_PRELOAD`, `LD_LIBRARY_PATH`, `DYLD_*`). Lookups verify every recorded file by SHA-256 digest, including the compiler binary, clang `.cfg` files, and GCC `specs`. Control caching via `WEFTI_PROBE_CACHE` (`readwrite`, `readonly`, `verify`, `off`, and `on` or `1` as aliases of `readwrite`), `WEFTI_PROBE_JOBS` (default `min(16, logical CPUs)` capped by RAM and up to 32, for literal compile checks only, never `try_run` or `execute_process`), `WEFTI_CACHE_DIR`, `WEFTI_PROBE_CACHE_DIR`, and optional HTTPS or S3 remote caches (`WEFTI_CACHE_REMOTE`). Share probe caches across CI jobs without a remote server using deterministic gzip tar archives. - `wefti cache export ` validates every entry and blob, verifies the finished archive against import rules, replaces `` atomically outside the cache root, and prints its SHA-256 digest. - `wefti cache import --sha256 <64-hex-digest>` verifies the complete archive under pre-allocation size budgets and publishes trusted entries into the live probe cache without overwriting valid local entries. - `wefti cache import ` without `--sha256` stages entries outside the live cache as untrusted candidates that never trigger hits and only repair missing blobs of matching local entries. ### Sound incremental configure replay Warm native reconfigures re-execute edited directory regions and replay unchanged subtrees from `CMakeFiles/wefti/configure.v1.bin` whenever entry context and recorded inputs match. Starting in `0.2.0`, toolchain files (`vcpkg`), configure presets, `-C` initial cache scripts, and `PreLoad.cmake` stay compatible with replay. Setup spans always run live and hash observable interpreter state into setup checkpoints so any setup difference disables replay hits safely for the remainder of that run. Set `WEFTI_REPLAY_SETUP=0` to disable replay when setup hooks exist, or `WEFTI_NO_INCREMENTAL=1` to disable replay completely. Replay also turns off under `--fresh`, `--debugger`, trace, profile, hermetic, verify, and debug flags. ### Ninja generation skip From version 0.3.0, a completed native Ninja generation records the configure state digests and a stamp of each file, directory, and environment variable that generation read. A later configure skips generation when all of them match, then replays the recorded output and refreshes manifest times for the Ninja rerun rule. `--fresh`, `--graphviz`, `WEFTI_SKIP_GENERATION=0`, and `WEFTI_REPLAY=0` prevent the skip. ### Stale `CMakeCache.txt` drift detection Every completed native configure writes `CMakeFiles/wefti/toolchain-inputs-v1.json` recording `CMAKE_TOOLCHAIN_FILE`, ordered cache and environment `CMAKE_PREFIX_PATH` lists, and each enabled language's compiler path, SHA-256 digest, launcher, ID, and version. Warm native configures warn on any changed field and keep warning until a fresh configure or fresh language identification updates the baseline. Run `wefti doctor -B ` to check drift offline without running compilers or project code (exit 0 clean, exit 1 missing files or drift, exit 2 invalid arguments). ### Provenance and inspection with `wefti explain` `wefti explain` evaluates a configured build tree in memory with zero subprocesses and no disk writes, printing terminal text or `--json` (`wefti-explain-v1`). - **Target and variable provenance.** `wefti explain -B ` with `--target`, `--var`, `--config `, and typed filters `--flag`, `--define`, `--include`, `--dep` (bounded at 16 paths, depth 32, 20,000 edges), or `--filter`. - **Package diagnosis.** `wefti explain --find ` and `wefti explain why-not ` read `CMakeFiles/wefti/find-trace.v1.json` when fresh or re-evaluate in memory, supporting `--call `, `--all-candidates`, and `--fresh`. - **Generator expression evaluation.** `wefti explain --eval ''` and `wefti explain --eval-property ` evaluate expressions across configs with `--target`, `--config`, `--lang`, `--link-lang`, `--directory`, `--link`, `--command-config`, `--output-config`, and `--no-steps`. Use `wefti explain --targets` to list project targets. Use `wefti preset show ` to inspect a resolved preset without configuring. Native configure can suggest corrections for unused `-D` variables. ### Build tree comparison with `wefti diff-config` `wefti diff-config ` (or `--preset --preset -S `) compares any two `wefti` or official `cmake` build directories across `targets`, `compile`, `link`, `toolchain`, `packages`, and `cache` without invoking `cmake`. Use `--save` to write a portable snapshot for comparison on another machine. Supports `--only`, `--config a[:b]`, `--target`, `--cache key|all|none`, `--no-normalize`, `--json`, and `--prepare` (which plants the four stateless File API query files). Exits 0 on match with complete evidence, 1 on differences, and 2 on invalid arguments or incomplete evidence. ### Lossless formatting and static linting `wefti fmt` edits only whitespace and optional command identifier case on `CMakeLists.txt` and `*.cmake`, independently verifying AST equivalence, protected tokens, and comment attachment before writing, and supports `--check`, `--diff`, `--stdin`, and `--stdin-filepath`. `wefti lint` runs 12 static rules (`undefined-variable`, `glob-without-configure-depends`, `single-config-condition`, `unguarded-build-type`, `directory-options`, `obsolete-command`, `old-policy`, `fragile-if-expansion`, `legacy-block-end-args`, `deprecated-link-scope`, `redundant-fatal-error`, and `redundant-policy-pin`) with `--sarif`, `--list-rules`, `--deny-warnings`, and `# wefti-lint: disable=` one-command suppressions. Both commands read `.wefti.toml` (`exclude`, `[fmt]`, `[lint]`, `[lint.severity]`) and share exact formatting and diagnostics with `wefti-lsp`. `wefti lint --fix` applies safe fixes in place. `--unsafe-fixes` also applies fixes that can change configure behavior. `--dry-run` and `--diff` report fixes without writing files. The fixer runs at most 4 passes and writes files atomically. ### Unused packages, links, and variables with `wefti unused` `wefti unused` configures the project again in memory, writes no files to the build tree, and starts no subprocesses. It reports unused packages, duplicate links, empty `INTERFACE` links, and, with `--only vars`, unused variables. `--include-optional` adds optional packages that were not found. Output is terminal text, `--json` (`wefti-unused-v1`), or `--sarif` (SARIF 2.1.0). `--deny` exits with code 1 when there are findings. ### Target dependency graphs with `wefti graph` `wefti graph` configures in memory and prints the target graph as `tree`, `dot`, `mermaid`, or `json` (`wefti-graph-v1`). It supports `--target`, `--reverse`, `--cycles-only`, `--depth`, `--no-external`, `--highlight-public-bloat`, and `--check-headers`. ### Isolated parity verification with `wefti verify` `wefti verify [--oracle ] [--timeout ] [--json] -- ` delegates to the isolated sibling binary `wefti-verify` (`WEFTI_ORACLE_CMAKE` fallback lives strictly inside `wefti-verify`, never in `wefti`). It stages pristine source copies in a private scratch directory, configures with both `wefti` (compatibility mode) and CMake 4.5.1 under `WEFTI_VERIFY_TIMEOUT` (default 600 seconds), and compares configure status, File API codemodel, `CMakeCache.txt`, `compile_commands.json`, and Ninja dry-run output. ### Multi-config `compile_commands.json`, profiling, hermetic audits, and FetchContent lockfiles - **Multi-config compile databases.** Passing `--export-compile-commands` or `CMAKE_EXPORT_COMPILE_COMMANDS=ON` in native mode on `Ninja Multi-Config`, `Xcode`, or `Visual Studio` writes `compile_commands.json` plus per-config `compile_commands_.json`, tracked in `CMakeFiles/wefti/compile-commands-v1.json`. - **Profiling (`--profile[=]`).** Writes `trace.json`, `stacks.folded`, and `flamegraph.html` under `` (default `/wefti-profile`) plus `run-*` archives. - **Rich diagnostics (`--diagnostics=rich` or `cmake`).** Defaults to `rich` on a terminal in native mode. - **Hermetic checks (`--hermetic=warn` or `strict`).** Audits undeclared environment, file, process, and network access with `WEFTI_HERMETIC_ALLOW_*` allowlists. - **FetchContent lockfiles (`--fetch-lock=off`, `auto`, `update`, `frozen`).** Pins archive hashes and Git commits in `wefti.lock`. Fetch-only projects can use `wefti-fetch.lock`. Native mode can prefetch pinned sources. Set `WEFTI_FETCH_OFFLINE=1` for offline builds. ## 5. Workspace architecture and the `Host` trait The Wefti workspace has 43 crates. Its dependencies have no cycles. The file `docs/ADR.md` contains 71 architecture decision records (ADRs). 1. **Foundation and language.** `wefti-base`, `wefti-json`, `wefti-diag`, `wefti-host`, `wefti-syntax` (including lossless concrete tokens), `wefti-regex` (independent KWSys dialect), `wefti-expr`, and `wefti-genex`. 2. **Configure and resolution.** `wefti-model`, `wefti-eval` (with `DebugHook` and setup-checkpoint replay), `wefti-commands`, `wefti-presets`, `wefti-resolve` (transitive usage, RPATH, CUDA, HIP, Swift, Fortran, Qt AUTOGEN, `BuildGraph`), `wefti-build`, `wefti-cxxmodules`, `wefti-fortran`, and `wefti-winproc`. 3. **Generators, test, package, and storage.** `wefti-gen-common`, `wefti-ninja`, `wefti-gen-ninja`, `wefti-gen-make`, `wefti-gen-xcode`, `wefti-gen-vs`, `wefti-ctest`, `wefti-cpack`, `wefti-cps`, `wefti-instrument`, `wefti-tool-e`, `wefti-archive`, `wefti-store`, and `wefti-fetch`. 4. **Developer tools, front ends, and verification.** `wefti-buildinfo`, `wefti-language-tools`, `wefti-ccmake`, `wefti-dap`, `wefti-cli`, `wefti-shim`, `wefti-api`, `wefti-lsp`, `wefti-wasm`, `wefti-harness` (including `wefti-verify`), and `wefti-fuzz`. All OS access flows through `Arc` (`NativeHost` using `rustix` and Windows job objects, and in-memory `PureHost`). Wrapping `Host` enables deterministic tests, `--hermetic`, `JournalHost`, `CaptureHost`, `wefti-lsp` unsaved-buffer overlays, and WebAssembly without modifying the evaluator core. ## 6. Language server, embedded Rust API, and WebAssembly playground - **`wefti-lsp` (`wefti lsp`).** The v3 Language Server Protocol server uses standard input and output. It supports `-h`, `--help`, `-V`, `--version`, `--stdio`, and `--clientProcessId=`. Release binaries include the evaluated mode, which configures in memory over unsaved buffers. It delivers hover with evaluated values and target usage provenance, dimmed inactive `if()` branches, completion, go to definition, workspace references and rename, symbols, semantic tokens, quick fixes, lossless CMake formatting configured via `.wefti.toml`, all 12 lint rules, `compile_commands.json` sync on save, and `.cmake.in` template handling across VS Code, Neovim, Helix, Zed, Emacs, and CLion. - **VS Code and Zed extensions.** `editors/vscode/` (also Cursor and Windsurf) adds highlighting, formatting, a preset picker, and the debugger. `editors/zed/` adds Tree-sitter highlighting and `wefti-lsp`. Both find the server without configuration. Build the VS Code package from source, and install the Zed extension as a development extension. - **`wefti-api`.** Embeds `run_configure`, `WorkspaceIndex`, provenance, and `explain` in Rust programs via Git dependency. With `default-features = false`, compiles to `wasm32-unknown-unknown` and `wasm32-wasip1` with zero C dependencies. - **Browser playground.** Hosted at `https://wefti.dev/playground.html`, running `site/wasm/wefti_wasm.wasm` (`wasm32-wasip1`, no `unsafe`, no `wasm-bindgen`) locally on `PureHost`. ## Native commands in v0.4.0 - Use `wefti build` to run Ninja build rules with the built-in Ninja 1.13.2 executor. - Use `wefti new` to create a C or C++ project in a new directory. Use `wefti init` to create one in the current directory. - Use `wefti env` to inspect or apply the detected toolchain environment. - Use `wefti modernize` to preview CMake file rewrites. Add `--apply` to write the changes. - Use `wefti add` and `wefti remove` to change dependency declarations and update `wefti.lock`. - Use `wefti test` to run tests with live progress and see output from failed tests. - Use `wefti sbom` to write a software bill of materials in SPDX 3.0.1 or CycloneDX 1.6 format. Use `wefti audit` to check dependency pins, cached archives, and Git mirrors. - Use `wefti cache remote` to check the remote cache connection, `wefti cache pull` to restore a verified cache pack, and `wefti cache push` to upload eligible cache entries. - The `wefti-lsp` v3 language server adds evaluated inline hints, code lenses, and definition lookup for imported targets, FetchContent sources, and bundled modules. Code lenses are actions that an editor shows above a declaration. See the [native command guide](https://github.com/wefti/wefti/blob/v0.4.0/docs/TOOLING.md) for examples. ## Install channels and command examples Check [channel availability](https://wefti.dev/install.html#channel-status) for verification links. The [VSIX](https://github.com/wefti/wefti/releases/download/v0.4.0/wefti-0.4.0.vsix) is available as a release file. The VS Code Marketplace, Open VSX, and Zed catalog listings are planned. - Show why configure ran or reused its result with `wefti explain --why-rebuilt -B build`. - Configure again when CMake inputs change with `wefti watch -B build --build --test`. - Run `wefti shim enable` and put the directory it prints first on `PATH` to use the CMake aliases. - Update an existing install with `wefti self-update`. - Install the Python wheels with `pip install wefti` and `pip install wefti-cmake`. - Use `wefti/wefti/actions/setup-wefti@v0.4.0` in GitHub Actions. Use `rev: v0.4.0` for the hooks in `.pre-commit-hooks.yaml`. - Run the container with `docker run --rm -v "$PWD":/work ghcr.io/wefti/wefti:0.4.0 -S . -B build`. ## 7. Installation, aliasing, upgrade, and uninstall From version 0.3.0, prebuilt releases target `aarch64-apple-darwin`, `x86_64-apple-darwin`, `x86_64-unknown-linux-gnu`, `aarch64-unknown-linux-gnu`, `x86_64-pc-windows-msvc`, and `aarch64-pc-windows-msvc`. Releases up to 0.2.2 have no Intel macOS or Windows ARM64 archive. - **Linux and macOS.** `curl -fsSL https://raw.githubusercontent.com/wefti/wefti/main/scripts/install.sh | bash` installs `wefti`, `wefti-lsp`, `wefti-verify`, `share/cmake-4.5`, completions, and `wefti(1)` plus `ccmake(1)` into `~/.local` with SHA-256 verification. Pass `--alias-cmake` to symlink `cmake`, `ctest`, `cpack`, and `ccmake`, or `--uninstall` to remove installed files. Verify build provenance with `gh attestation verify wefti--.tar.gz --repo wefti/wefti`. - **Windows.** `irm https://raw.githubusercontent.com/wefti/wefti/main/scripts/install.ps1 | iex` installs `wefti.exe`, `wefti-lsp.exe`, `wefti-verify.exe`, and `share\cmake-4.5` into `%LOCALAPPDATA%\wefti`. Download `install.ps1` to pass `-AliasCmake`, `-Prefix`, `-Version`, `-Archive`, `-Force`, or `-Uninstall`. - **Package managers.** `brew install wefti/tap/wefti`, `scoop bucket add wefti https://github.com/wefti/scoop-bucket` then `scoop install wefti/wefti`. The WinGet catalog submission is pending. - **Nix.** `nix profile install github:wefti/wefti`, or `nix profile install github:wefti/wefti#wefti-dropin` to also get `cmake`, `ctest`, `cpack`, and `ccmake`. - **cargo-binstall.** Run `cargo binstall --git https://github.com/wefti/wefti wefti-cli`. Wefti v0.4.0 release binaries embed `share/cmake-4.5`. On first run, Wefti unpacks the data into its cache directory. If you build from source without `--features wefti-cli/embedded-data`, set `WEFTI_VENDORED_DATA_ROOT` to the data directory if Wefti cannot find it. ## 8. Intentional differences, limits, and troubleshooting 1. **No `cmake-gui`.** Graphical desktop setup is not included. 2. **External tools for installers and verify.** CPack installer generators invoke host packaging tools (`pkgbuild` and `productbuild`, `makensis`, `wix`, `binarycreator`), and `wefti verify` requires a user-supplied CMake 4.5.1 binary. 3. **Omitted legacy generators.** CodeBlocks, CodeLite, Eclipse CDT4, Kate, Sublime Text 2, `MSYS`, `MinGW`, `Borland`, `Watcom`, `Green Hills MULTI`, `FASTBuild`, and Visual Studio 14 to 16 are omitted. 4. **GPU and Swift CI coverage.** CUDA, HIP, and Swift target lowering are shipped, while standard CI runners lack GPU hardware and full Swift or HIP toolchains. 5. **Reproducible archives, in-process `try_compile`, `--version`, and `CMAKE_STRIP`.** Archives record uid 0 and gid 0, `try_compile` runs in-process without MSBuild-only or Xcode-only probe attributes, `--version` line 2 prints `wefti 0.4.0`, and `--install --strip` skips CMake false `CMAKE_STRIP` values. Troubleshooting tips cover `type -a cmake` for PATH precedence, `WEFTI_VENDORED_DATA_ROOT` for `CMAKE_ROOT`, invoking `wefti` (not `cmake`) for native flags, `wefti doctor -B ` for cache drift, `WEFTI_PROBE_CACHE=verify` for probe checks, and `wefti verify` or `WEFTI_ORACLE_MODE=1` for parity bug triage. ## 9. Verification methodology `wefti` is tested against pinned CMake 4.5.1 across seven layers (unit and integration tests on `PureHost` and `NativeHost`, recorded `wefti-harness` CLI and script cases, 3-OS upstream `Tests/RunCMake`, 20 independent black-box scenarios with 679 checks, 10 pinned large C++ projects at L1 and L2 parity, 14-target seeded generative fuzzing plus 64-shard `vcpkg`, Conan, probe-cache soundness, mutation replay, and WebAssembly smoke checks, and a sealed 240-repository unseen holdout). Current release measurements, per-project giant benchmarks, and soundness gate receipts publish directly in `https://wefti.dev/dashboard.html` and `https://wefti.dev/data/latest.json`. ## 10. Common questions ### What is a faster drop-in CMake replacement written in Rust? `wefti` is an independent drop-in reimplementation of CMake 4.5.1 in safe Rust that reads existing `CMakeLists.txt` files, Presets v13, and caches. Native mode speeds up configures via a cross-project verified probe cache, parallel compile probes, portable CI cache export and import, and sound incremental replay even under toolchains and presets. ### How do I verify whether wefti matches CMake 4.5.1 on my project? Run `wefti verify --oracle /path/to/cmake-4.5.1 -- -S . -G Ninja` to compare configure status, File API codemodel, `CMakeCache.txt`, `compile_commands.json`, and Ninja dry-run output on staged copies. You can also compare existing trees with `wefti diff-config`, isolate native features with `WEFTI_ORACLE_MODE=1`, or verify probe hits with `WEFTI_PROBE_CACHE=verify`. ### Can I run CMake in WebAssembly or format and lint CMake files? Yes. `wefti-api` compiles to `wasm32-unknown-unknown` and `wasm32-wasip1` on `PureHost` and powers `https://wefti.dev/playground.html`. Locally and in editors (`wefti-lsp`), `wefti fmt` formats listfiles losslessly and `wefti lint` checks 12 static rules configured in `.wefti.toml`. ### What is the best drop-in CMake replacement? If a project must keep its `CMakeLists.txt` files and presets, Wefti is built for that task. It runs as `cmake`, `ctest`, `cpack`, and `ccmake`. In v0.4.0, 72 of 77 eligible sealed holdout repositories passed strict L1 parity. Run `wefti verify` on your project before you switch. Details: [CMake replacement](https://wefti.dev/cmake-replacement.html). ### How do I make CMake configure faster? Use the native `wefti` command. It runs eligible compiler probes in parallel, shares a SHA-256 verified probe cache, replays unchanged directories, and from 0.3.0 can skip unchanged Ninja generation. Details: [Faster CMake](https://wefti.dev/faster-cmake.html). ### How do I get better CMake tooling without a rewrite? Wefti adds `wefti explain`, `wefti lint --fix`, `wefti fmt`, `wefti unused`, `wefti graph`, `wefti diff-config`, and `wefti doctor` to existing CMake projects. Details: [Better CMake](https://wefti.dev/better-cmake.html). ### Is there a CMake linter and formatter, or an alternative to cmake-format and gersemi? `wefti fmt` is a lossless CMake formatter with `--check` and `--diff`. `wefti lint --fix` checks 12 rules, and `wefti unused` reports unused packages and links. Settings come from `.wefti.toml`. Details: [CMake linter and formatter](https://wefti.dev/cmake-linter-formatter.html). ### How do I debug CMake flags, targets, and scripts? `wefti explain` shows where a flag, definition, include directory, or link comes from. `wefti graph` shows target dependencies, `wefti diff-config` compares build trees, and `--debugger` starts a Debug Adapter Protocol (DAP) server. Details: [Debug CMake](https://wefti.dev/debug-cmake.html). ### How do I cache CMake configure in CI? Move verified `try_compile` probe results between runners with `wefti cache export` and `wefti cache import --sha256`. Pin `FetchContent` downloads with `--fetch-lock`, and audit undeclared inputs with `--hermetic`. Details: [CI cache](https://wefti.dev/cmake-ci-cache.html). ### How do I migrate from CMake safely? Keep CMake 4.5.1 installed, run `wefti verify` on staged copies, then configure a fresh build tree and run your tests. Your `CMakeLists.txt` files stay unchanged, so you can switch back. Details: [Migrate from CMake](https://wefti.dev/migrate-from-cmake.html). ### What is the best CMake alternative compared with Meson, Bazel, and Xmake? To keep `CMakeLists.txt`, use a drop-in engine such as Wefti. To rewrite the build, evaluate Meson (`meson.build`), Bazel (`BUILD` files), or Xmake (`xmake.lua`). Ninja runs generated build rules and does not replace these tools. Details: [Best CMake alternative](https://wefti.dev/best-cmake-alternative.html) and [Compare](https://wefti.dev/cmake-vs-wefti.html). ### Which CMake language server works in VS Code, Zed, and Neovim? `wefti-lsp` evaluates the project and gives hover, completion, rename, 12 lint rules with quick fixes, and formatting. First-party extensions cover VS Code, Cursor, Windsurf, and Zed. Neovim and other editors connect over stdio. Details: [CMake LSP](https://wefti.dev/cmake-lsp.html). ### How fast is Wefti compared with CMake 4.5.1? In v0.4.0, Wefti was faster in 37 of 40 matched workloads on an Apple M1. Speedups ranged from 0.97x to 138.17x. For five large projects, geometric mean speedups were 1.31x cold, 2.21x with a warm probe cache, and 2.24x after a leaf edit. Details: [Benchmarks](https://wefti.dev/benchmarks.html). ### Does Wefti work with vcpkg and Conan? Yes, through the existing CMake integrations. In v0.4.0, all 1,518 scored vcpkg ports matched, and both Conan scenarios passed. Details: [Compatibility](https://wefti.dev/dashboard.html). ### Can I run CMake online? The browser playground runs configure, generation, diagnostics, and explain in WebAssembly. Files are not uploaded to a server, and no code is compiled. Details: [Playground](https://wefti.dev/playground.html). ### Can I embed a CMake engine in Rust or WASI? `wefti-api` provides configure and `explain` to Rust programs as a Git dependency. With `default-features = false`, it compiles to `wasm32-unknown-unknown` and `wasm32-wasip1`. Details: [Full technical reference](https://wefti.dev/llms-full.txt). ### How do I install Wefti? Use the release script, `brew install wefti/tap/wefti`, Scoop, Nix, or cargo-binstall. The WinGet catalog submission is pending. Details: [Install](https://wefti.dev/install.html). ### When should I not use Wefti? Keep upstream CMake if you need `cmake-gui`, an omitted legacy generator, Visual Studio 14 to 16, or if `wefti verify` finds differences in your project. A new project with no CMake dependencies can use Meson, Bazel, or Xmake. Details: [Overview](https://wefti.dev/). ### How does Wefti compare with Meson, and can I switch without rewriting CMake files? Meson needs `meson.build` files. Wefti reads your existing `CMakeLists.txt`, so there is no rewrite. The peer benchmark includes Meson. Details, [CMake vs Meson](https://wefti.dev/cmake-vs-meson.html). ### How do I make a CMake build hermetic and reproducible? Run `--hermetic=warn` to find undeclared reads and `--hermetic=strict` in CI. Pin FetchContent with `--fetch-lock=update` and use `--fetch-lock=frozen` with `WEFTI_FETCH_OFFLINE=1`. Details, [CMake vs Bazel](https://wefti.dev/cmake-vs-bazel.html). ### Which small C++ build system should I pick, Xmake, Premake5, GN, Muon, or Wefti? Pick Wefti if you have `CMakeLists.txt`. Pick Xmake for a new Lua-based project with a package repository, Premake5 for generated IDE projects, GN for a large Ninja repository, and Muon for a Meson project that avoids Python. Details, [CMake vs Xmake](https://wefti.dev/cmake-vs-xmake.html). ### Is there a pre-commit hook for CMake formatting and linting? Yes. The hooks `wefti-fmt`, `wefti-fmt-fix`, and `wefti-lint` use rev v0.4.0. They run the `wefti` that is on your `PATH`. Details, [cmake-format alternative](https://wefti.dev/cmake-format-alternative.html). ### Which CMake language server completes find_package and CMakePresets.json? `wefti-lsp` completes installed packages in `find_package()`, targets in `target_link_libraries()`, and keys, preset names, and macros in preset files. Details, [neocmakelsp alternative](https://wefti.dev/cmake-lsp-neocmakelsp-alternative.html). ### How do I cache try_compile in GitHub Actions? Use `setup-wefti@v0.4.0` and configure with `wefti`. The action enables GitHub Actions Cache v2 for the Wefti cache. Details, [GitHub Actions](https://wefti.dev/cmake-github-actions.html). ### Can I use Wefti with scikit-build-core and uv? Run `uv pip install wefti-cmake`. To install a local wheel, build it with `scripts/build-wheels.py` and add `--find-links dist/wheels`. Details, [Python extensions](https://wefti.dev/python-scikit-build-cmake.html). ### Why is my CMake configure slow, and how do I find unused dependencies? Run `wefti -S . -B build --profile` for a flame graph and `wefti unused -B build` for unused packages and links. Details, [Slow configure](https://wefti.dev/cmake-slow-configure.html). ### How do I see the CMake target dependency graph, and why did CMake rebuild? Run `wefti graph -B build --format mermaid` for the graph. For a rebuild, run `ninja -d explain`, then `wefti diff-config` on two build trees. Details, [Slow configure](https://wefti.dev/cmake-slow-configure.html).