Skip to content

Install Aya

At this stage of development, we recommend using the nightly version of Aya. Go to GitHub Release, there will be a plenty of files. It's updated per-commit in the main branch, but the release date displayed is very old and is an issue of GitHub itself.

Checking the section below that fits your platform. After the installation, run aya --help for general instructions and aya -i to start an interactive REPL. If you chose the jlink version, the bin folder contains the executable scripts.

Download from GitHub Release

Aya is available for Windows, Linux, and macOS, as listed below.

PlatformArchitectureJLinkNative
Windowsx64zipexe
Linuxx64zipexe
macOSx64zipexe
Windowsaarch64zipUnavailable yet
Linuxaarch64zipUnavailable yet
macOSaarch64zipUnavailable yet

Here's a hands-on script I wrote to (re)install Aya to $AYA_PREFIX (define the variable somewhere or replace with your preferred prefix, e.g. /opt/aya) on Linux x64:

bash
#!/bin/bash
sudo mkdir -p ${AYA_PREFIX:-/tmp}
sudo chown $USER ${AYA_PREFIX:-/tmp}
rm -rf ${AYA_PREFIX:-/tmp}/*
cd ${AYA_PREFIX:-/tmp}
wget https://github.com/aya-prover/aya-dev/releases/download/nightly-build/aya-prover_jlink_linux-x64.zip
unzip aya-prover_jlink_linux-x64.zip
rm aya-prover_jlink_linux-x64.zip
cd -

If it's the first time you install Aya, you may want to do (or replace ~/.bashrc with your shell's rc file):

bash
echo 'export PATH="$AYA_PREFIX/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Use Aya in GitHub Actions

If you want to use Aya in your GitHub Actions workflow, you can use aya-prover/setup-aya like

yaml
- name: Setup Aya
  uses: aya-prover/setup-aya@latest
  with:
    version: 'nightly-build'

The step above will install the latest version of Aya to PATH. You can find the complete example here.

If you already have Java runtime...

Very cool! Now you can try the prebuilt jars (much smaller and platform-independent) or build Aya from source.

We will always be using the latest release of Java. Not that we do not stay on LTS releases.

Prebuilt binary

Download the jar version of cli (for using command line) and lsp (for using VSCode) and run it with java --enable-preview -jar [file name].jar.

Build from source

Clone the repository. Then, run build with ./gradlew followed by a task name. If you have problems downloading dependencies (like you are in China), check out how to let gradle use a proxy.

bash
# build Aya and its language server as applications to `ide-lsp/build/image/current`
# the image is usable in Java-free environments 
./gradlew jlinkAya --rerun-tasks
# build Aya and its language server as executable
# jars to <project>/build/libs/<project>-<version>-fat.jar
./gradlew fatJar
# build a platform-dependent installer for Aya and its language
# server with the jlink artifacts to ide-lsp/build/jpackage
# requires https://wixtoolset.org/releases on Windows
./gradlew jpackage
# run tests and generate coverage report to build/reports
./gradlew testCodeCoverageReport
# (Windows only) show the coverage report in your default browser
./gradlew showCCR

Gradle supports short-handed task names, so you can run ./gradlew fJ to invoke fatJar, tCCR to invoke testCodeCoverageReport, and so on.