Install

The compiler is written in C++20 with minimal runtime dependencies. Build it, run a file, or drop into the REPL.

1

Clone the repo

git clone https://github.com/kexhq/kex.git
cd kex
2

Build

Requires CMake 3.20+ and a C++20 compiler (clang, gcc, or Apple clang).

make build          # produces ./build/kex
3

Run it

make run F=examples/fizzbuzz.kex
make repl                       # drop into the REPL
build/kex examples/vectors_advanced.kex
4

Install (optional)

Copies the built binary to a path on your PATH. It intentionally does not build as root.

sudo make install              # /usr/local/bin/kex
make install PREFIX=$HOME/.local   # install elsewhere

Make targets

  • make build build the compiler
  • make run F= run a .kex file
  • make repl start the REPL
  • make test C++ unit tests
  • make spec language specs
  • make check F= semantic analysis only
  • make parse parse all examples
  • make clean remove build artifacts