Installation
WeaveC currently ships source releases. Build it against an LLVM/Clang development installation, and keep that LLVM installation available at runtime. The CI-tested platforms are macOS and Linux.
1. Install the toolchain
Section titled “1. Install the toolchain”You need CMake 3.25 or newer for the supplied presets, Ninja, a C++20 compiler, and the LLVM/Clang development libraries. LLVM 23.x is recommended; the project supports LLVM 20 and newer. Tests also require lit and LLVM’s FileCheck.
brew install cmake llvm ninja litexport WEAVEC_LLVM_PREFIX="$(brew --prefix llvm)"Apple’s system Clang can compile WeaveC, but the development libraries come from Homebrew’s LLVM package. Xcode does not include them.
Install LLVM from the official LLVM packages for your distribution. Review the installer before running it with elevated privileges:
wget https://apt.llvm.org/llvm.shless llvm.shsudo bash llvm.sh 23 allsudo apt-get install -y cmake ninja-build python3-venvpython3 -m venv .venv. .venv/bin/activatepip install lit==23.1.0export WEAVEC_LLVM_PREFIX=/usr/lib/llvm-23export CC=clang-23 CXX=clang++-23Check cmake --version; older distributions may need a newer CMake installation to use the presets.
2. Get a release
Section titled “2. Get a release”Download the source archive and SHA256SUMS from GitHub Releases into the same directory. Verify the archive with one of:
shasum -a 256 -c SHA256SUMS # macOSsha256sum -c SHA256SUMS # LinuxExtract weavec-X.Y.Z-source.tar.gz, replacing X.Y.Z with the downloaded version, and enter its weavec-X.Y.Z directory.
For development, you can instead clone the current source:
git clone https://github.com/weavefoundry/weavec.gitcd weavec3. Build, test, and install
Section titled “3. Build, test, and install”Run these commands from the source directory:
cmake --preset release -DWEAVEC_VERSION_SUFFIX=""cmake --build --preset releasectest --preset releasecmake --install build/release --prefix "$HOME/.local"export PATH="$HOME/.local/bin:$PATH"Add the PATH export to your shell configuration to retain it in new terminals. Use the developer guide for debug builds, alternative LLVM installations, and build options.
4. Verify the installation
Section titled “4. Verify the installation”weavec --versionweavec-cc --versionBoth commands should print their version. If Clang resources or shared libraries cannot be found, check installation troubleshooting.
Next: Run your first check.