Getting started
Install
Homebrew (macOS + Linux)
brew install code-by-sia/x/xi
brew upgrade xi # later, to update
Tarball (any supported platform)
Download the toolchain for your platform from the
releases page, unpack it, and put
its bin/ on your PATH:
# grab the asset for your platform, e.g. xi-<version>-macos-arm64.tar.gz
tar -xzf xi-<version>-<os>-<arch>.tar.gz
export PATH="$PWD/xi-<version>-<os>-<arch>/bin:$PATH"
Either way you get two commands — xc (compiler) and xi (run tool + REPL).
Tarball installs upgrade in place with xi update; Homebrew installs upgrade
with brew upgrade xi.
Requirements: a C compiler (cc — clang or gcc) on your PATH, since xc
produces a native binary by compiling generated C. Supported platforms:
Linux (x86_64, arm64) and macOS (arm64, x86_64).
Windows
No native Windows build yet (the runtime uses POSIX APIs). Use WSL2 (install a Linux distro and follow the Linux steps), or Docker:
docker build -t xi . # from a clone of the repo
docker run --rm -v "${PWD}:/work" xi xi hello.xi # compile + run
docker run --rm -it -v "${PWD}:/work" xi xi # REPL