# wefti > Independent drop-in reimplementation of CMake 4.5.1 in safe Rust. One multi-call binary runs as `cmake`, `ccmake` on macOS, Linux, and Windows, `ctest`, `cpack`, and `wefti-lsp`, reading existing `CMakeLists.txt` files, presets, and caches and writing compatible build trees. `wefti` 0.2.2 contains no copied or translated CMake C++ source code, and the core engine never invokes an upstream `cmake` binary at runtime. The audited Windows process interface in `wefti-winproc/src/ffi.rs` contains the only project `unsafe` blocks. External Rust crates such as `rustix` and `memchr` use `unsafe` internally, and the native binary statically links `zstd` 1.5.7 and `liblzma` 5.8. Rust and Python code in this repository is dual-licensed under `MIT OR Apache-2.0`, while bundled CMake 4.5.1 `Modules/`, `Templates/`, `Help/`, and derived tables stay under `BSD-3-Clause`. `wefti` is not affiliated with Kitware, and CMake is a trademark of Kitware, Inc. ## Verified v0.2.2 parity and speed results (commit `0e9111c5887f`) - Upstream Tests/RunCMake matched CMake 4.5.1 in 27,953 / 27,953 cases (100.00%) across 1,099 / 1,099 suites on macOS, Linux, and Windows. - The `FindPkgConfig` suite runs only on POSIX systems. The Windows results exclude it. - Strict L1 configure and L2 Ninja dry-run parity passed on 10 / 10 large C++ projects. - Across 64 / 64 vcpkg shards, all 1,520 / 1,520 ports with an observed CMake configure matched (100.00%). The run inspected 2,621 ports. - wefti ran faster in 40 / 40 benchmark workloads. Speedups ranged from 1.03x to 13.15x. - The geometric means across DuckDB, OpenCV, Protobuf, Qt Base, and LLVM were 1.25x cold, 1.72x with a warm probe cache, and 1.50x after a leaf edit. - On the sealed set of 240 repositories, 44 / 80 eligible repositories passed strict L1 parity (55.00%). An eligible repository configured with CMake. - The seeded fuzz tests ran 14,000,000 inputs across 14 formats, with 0 failures. ## Guides and canonical pages - [Overview](https://wefti.github.io/wefti/) - [CMake replacement](https://wefti.github.io/wefti/cmake-replacement.html) - [Faster CMake](https://wefti.github.io/wefti/faster-cmake.html) - [Compare](https://wefti.github.io/wefti/cmake-vs-wefti.html) - [Benchmarks](https://wefti.github.io/wefti/benchmarks.html) - [Install](https://wefti.github.io/wefti/install.html) - [Playground](https://wefti.github.io/wefti/playground.html) - [Compatibility](https://wefti.github.io/wefti/dashboard.html) - [Full technical reference](https://wefti.github.io/wefti/llms-full.txt) - [Release scorecard data](https://wefti.github.io/wefti/data/latest.json) - [Atom release feed](https://wefti.github.io/wefti/feed.xml) ## CMake 4.5.1 parity - **CLI tools in one binary.** Inspects `argv[0]` to run as `cmake`, `ccmake` on macOS, Linux, and Windows, `ctest`, `cpack`, or `wefti-lsp` (`wefti lsp`). Covers configure, generate, `-P` scripts, `-E` utilities, `--build`, `--install`, `--workflow`, `--find-package`, `--sarif-output`, and `--debugger` over Unix sockets or Windows named pipes. `ctest` handles parallel runs, GNU make jobserver access, fixtures, resources, JUnit and dashboard XML, and `-S` scripts. `cpack` handles archives (`TGZ`, `TXZ`, `TZST`, `TBZ2`, `TZ`, `TAR`, `STGZ`, `ZIP`, `7Z`), Linux `DEB` and `RPM`, `External`, macOS `Bundle`, `DragNDrop`, and `productbuild`, Windows `WIX` (v3 and v4), and cross-platform `NSIS`, `NSIS64`, and `IFW`. - **Two execution modes.** Running as `cmake`, `ccmake`, `ctest`, or `cpack`, or setting `WEFTI_ORACLE_MODE=1`, selects strict CMake 4.5.1 compatibility mode. Running as `wefti` selects native mode and keeps that persona across build-time regenerations. - **Generators.** `Ninja` and `Ninja Multi-Config` on macOS, Linux, and Windows, `Unix Makefiles` on macOS and Linux, `NMake Makefiles` on Windows, `Xcode` on macOS, and `Visual Studio 17 2022` and `Visual Studio 18 2026` on Windows. - **Languages.** C (C90 to C23), C++ with C++20 and C++23 named modules and Ninja `dyndep`, Objective-C, Objective-C++, Fortran with `.mod` scanning, CUDA (NVCC and Clang, separable compilation, device linking), HIP (AMD ROCm, SPIR-V, NVIDIA), Swift (`CMP0157`, `CMP0195`, `CMP0215`, `CMP0216`), `ASM`, `ASM_MASM`, `ASM_NASM`, Windows `RC`, and Qt `AUTOMOC`, `AUTOUIC`, and `AUTORCC`. - **CMake 4.5.1 interfaces.** Policies `CMP0000` to `CMP0226` (`CMP0000` to `CMP0065` always NEW, 161 active policies `CMP0066` to `CMP0226`), Presets schema v13, File API (`codemodel` v2.12, `cache` v2, `toolchains` v1, `cmakeFiles` v1, `configureLog` v1), CPS 0.15.0, SPDX 3.0.1 SBOM, Instrumentation API v1, `cmake_diagnostic()` with SARIF 2.1.0, and `compile_commands.json`. - **Platforms.** Prebuilt releases target `aarch64-apple-darwin`, `x86_64-unknown-linux-gnu`, `aarch64-unknown-linux-gnu`, and `x86_64-pc-windows-msvc`. Intel macOS builds from source. `wefti-api` compiles to `wasm32-unknown-unknown` and `wasm32-wasip1`. ## Native extensions in wefti mode - **Probe cache and portable CI archives.** Shares verified compiler checks across projects via SHA-256 input verification (`WEFTI_PROBE_CACHE`), runs up to four literal compile probes concurrently (`WEFTI_PROBE_JOBS`), supports HTTPS and S3 remote caches, and exchanges deterministic gzip tar archives with `wefti cache export` and `wefti cache import --sha256` (`WEFTI_PROBE_CACHE_DIR`). - **Sound incremental configure replay.** Replays unchanged directory subtrees even when toolchain files (`vcpkg`), configure presets, `-C` scripts, or `PreLoad.cmake` are active by running setup spans live and checking setup checkpoints. - **Stale cache drift detection.** Native configures and `wefti doctor -B