rcmake

Install rcmake

The v0.2.2 release provides binaries for Apple silicon, Linux x86_64 and arm64, and Windows x64. Use the native rcmake command or install aliases so existing scripts can call cmake, ccmake, ctest, and cpack.

Install and check the command

  1. Choose a package. Use the release installer for your operating system or build from source.
  2. Verify the download. Compare the SHA-256 checksum with SHA256SUMS.txt. Use GitHub artifact attestations to check build provenance. See download verification.
  3. Select the command. Put the install bin directory on PATH. Use rcmake for native mode or add the CMake aliases for existing scripts.

macOS and Linux

With Bash and Python 3 installed, download the versioned installer. It checks the archive against the release SHA-256 checksum. Omit --alias-cmake if you only want to add the native commands.

curl -fsSLO https://raw.githubusercontent.com/rcmake/rcmake/v0.2.2/scripts/install.sh
bash install.sh --version 0.2.2 --alias-cmake
export PATH="$HOME/.local/bin:$PATH"
cmake --version

Windows

Run the PowerShell installer. The final command changes the path for the current session.

Invoke-WebRequest 'https://raw.githubusercontent.com/rcmake/rcmake/v0.2.2/scripts/install.ps1' -OutFile install.ps1
.\install.ps1 -Version 0.2.2 -AliasCmake
$env:Path = "$env:LOCALAPPDATA\rcmake\bin;$env:Path"
cmake --version

For a manual install, download and verify the Windows ZIP before you extract it. Run bin\rcmake.exe from the extracted directory or add its bin directory to PATH. Pass -Archive to the installer if you want it to install a local ZIP.

.\install.ps1 -Archive .\rcmake-0.2.2-x86_64-pc-windows-msvc.zip -AliasCmake

Homebrew, Scoop, and WinGet

The repository publishes the Homebrew formula, the Scoop manifest, and the WinGet manifests. The commands below install from those files. Clone the repository first and run the commands from its root.

git clone https://github.com/rcmake/rcmake.git
cd rcmake

Homebrew

brew tap-new local/rcmake
cp packaging/homebrew/rcmake.rb "$(brew --repository local/rcmake)/Formula/"
brew install local/rcmake/rcmake

Scoop

scoop install .\packaging\scoop\rcmake.json

WinGet

Local manifest installation requires an administrator to enable it. See the WinGet installation reference.

winget settings --enable LocalManifestFiles
winget install --manifest .\packaging\winget

Build from source

On macOS or Linux, including Intel Macs, install Rust 1.99.1 with Rustup, Python 3, and a native build toolchain. Run the source installer from the release checkout.

git clone --branch v0.2.2 https://github.com/rcmake/rcmake.git
cd rcmake
rustup toolchain install 1.99.1
scripts/install.sh --from-source

Verify downloads

Download the archive for your platform and SHA256SUMS.txt from the same release. On Linux, use the listed checksum and check the GitHub build attestation with the GitHub CLI.

file=rcmake-0.2.2-x86_64-unknown-linux-gnu.tar.gz
grep -F "  $file" SHA256SUMS.txt | sha256sum --check
gh attestation verify "$file" --repo rcmake/rcmake

On macOS, use shasum -a 256 --check in place of sha256sum --check and set file to the macOS archive. In PowerShell, compare the resulting hash against the entry for the ZIP in SHA256SUMS.txt.

Get-FileHash .\rcmake-0.2.2-x86_64-pc-windows-msvc.zip -Algorithm SHA256
gh attestation verify .\rcmake-0.2.2-x86_64-pc-windows-msvc.zip --repo rcmake/rcmake

GitHub Actions with a portable probe cache

Save this workflow as .github/workflows/rcmake.yml in an existing CMake project. Run it on a protected main branch. The first job exports the probe archive and its digest. The build job imports that artifact from the same run. Both jobs use the same runner image. The native rcmake configure command uses the shared cache, and the cmake and ctest aliases keep the existing build and test commands.

name: Build with rcmake
on:
  push:
    branches: [main]

permissions:
  contents: read

env:
  RCMAKE_PROBE_CACHE: readwrite
  RCMAKE_PROBE_CACHE_DIR: ${{ github.workspace }}/.rcmake-probes

jobs:
  prepare-probes:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - name: Install rcmake and Ninja
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build
          curl -fsSLO https://raw.githubusercontent.com/rcmake/rcmake/v0.2.2/scripts/install.sh
          bash install.sh --version 0.2.2 --alias-cmake
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
      - name: Configure and export verified probes
        run: |
          rcmake -S . -B build -G Ninja
          rcmake cache export probes.tar.gz
          sha256sum probes.tar.gz | cut -d ' ' -f 1 > probes.sha256
      - uses: actions/upload-artifact@v4
        with:
          name: rcmake-probes
          path: |
            probes.tar.gz
            probes.sha256
          if-no-files-found: error

  build:
    needs: prepare-probes
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - name: Install rcmake and Ninja
        run: |
          sudo apt-get update
          sudo apt-get install -y ninja-build
          curl -fsSLO https://raw.githubusercontent.com/rcmake/rcmake/v0.2.2/scripts/install.sh
          bash install.sh --version 0.2.2 --alias-cmake
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
      - uses: actions/download-artifact@v4
        with:
          name: rcmake-probes
      - name: Import probes and run the build
        run: |
          rcmake cache import probes.tar.gz --sha256 "$(cat probes.sha256)"
          rcmake -S . -B build -G Ninja
          cmake --build build
          ctest --test-dir build --output-on-failure

See the configure speed guide for cache hit conditions and the replacement guide for side-by-side verification.

Frequently asked questions

How do I make cmake run rcmake?

Install the aliases with --alias-cmake or -AliasCmake. Put the install bin directory first on PATH and run cmake --version to check which tool the shell finds.

Can I install rcmake alongside CMake?

Yes. Install rcmake without aliases and invoke it by name. Keep CMake 4.5.1 available for rcmake verify and for builds that require upstream CMake.

Can I carry compiler probes to a fresh runner?

Yes. Export probes from a trusted job, transfer the archive and its SHA-256 digest, and import them before native configure. Cache hits require matching recorded inputs.