Skip to content

Installation

Jiang does not yet publish stable prebuilt releases. The recommended way to try it today is to build the compiler from source.

  • A C/C++ build toolchain.
  • CMake.
  • LLVM 21.1.x.
  • A host C compiler available as cc for final executable linking.

The repository checks the LLVM version during configuration. If llvm-config --version is not 21.1.*, configuration fails early.

Terminal window
git clone https://github.com/jjcfun/jiang.git
cd jiang

Prefer passing the LLVM installation explicitly:

Terminal window
cmake -S . -B build -DJIANG_LLVM_ROOT=/opt/homebrew/opt/llvm@21
cmake --build build

Or point CMake at llvm-config:

Terminal window
LLVM_CONFIG=/opt/homebrew/opt/llvm@21/bin/llvm-config cmake -S . -B build
cmake --build build

After a successful build, the compiler is available at:

Terminal window
./build/jiangc

Run the sample test suite with the same LLVM toolchain:

Terminal window
LLVM_CONFIG=/opt/homebrew/opt/llvm@21/bin/llvm-config bash ./script/test.sh

Continue with Getting Started to compile a small program.