Install Kex
Three commands with Homebrew and you're running the latest release. Prefer Docker or building from source? Those work too.
latest stable: v0.3.3
Homebrew
Sets up Tey, which installs and manages Kex versions. macOS and Linux.
brew tap kexhq/tey
brew install kexhq/tey/tey
tey kex install Docker
No install. Runs Kex in a container you throw away after.
docker run --rm ghcr.io/kexhq/kex:latest kex --version Need a different version?
The brew install above includes Tey, which swaps Kex versions for you:
tey kex list # every version you can get
tey kex install 0.3.0-beta # get a specific one
tey kex use 0.3.0-beta # switch to it tey kex install alone gets
you the newest stable release;
tey kex install --pre gets
pre-releases.
Build from source
For contributors, packagers, or anyone who prefers a self-built
binary. Most users should use Homebrew or Docker above.
Build from source
For contributors, packagers, or anyone who prefers a self-built binary. Most users should use Homebrew or Docker above.
Clone the repo
git clone https://github.com/kexhq/kex.git
cd kex Install dependencies
brew install cmake gmp pcre2 boost readline
Build
make build # produces ./build/kex Run it
make run F=examples/fizzbuzz.kex
make repl # drop into the REPL
build/kex examples/vectors_advanced.kex Install the binary (optional)
Copies the built binary and standard library 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