Skip to content

Installation

Every installation provides two executables:

  • yonac — the compiler. Compiles .yona source to native executables, object files, or LLVM IR.
  • yona — the REPL, in compile-and-run mode.
Platform Command
Fedora / RHEL sudo dnf copr enable kovariadam/yona && sudo dnf install yona
Ubuntu / Debian sudo add-apt-repository ppa:kovariadam/yona && sudo apt update && sudo apt install yona
Arch Linux yay -S yona-bin
macOS / Linuxbrew brew install akovari/tap/yona
Windows MSI or ZIP from GitHub Releases

Distro packages place the compiler sysroot (standard library sources, interface files, runtime objects) under /usr/lib/yona or /usr/lib64/yona; Homebrew uses $(brew --prefix)/lib/yona. The compiler locates its sysroot automatically; --sysroot overrides it.

Verify the installation:

Terminal window
yonac -e 'let fib n = if n <= 1 then n else fib (n-1) + fib (n-2) in fib 10'
# => 55

The Homebrew formula builds from source against Homebrew llvm, lld, pcre2, and cli11 (Apple Silicon, Intel, and Linuxbrew). Wrappers on PATH set YONA_HOME and YONAC_CC so the keg-only LLVM is used when compiling Yona programs.

Optional GPU support via MoltenVK:

Terminal window
brew install akovari/tap/yona --with-vulkan

PPA builds compile from source on Launchpad. If your series has no published package yet, build a binary .deb from a release tarball:

Terminal window
./dist/debian/build-deb-from-release.sh 0.1.3 amd64
sudo apt install ./dist/debian/yona_0.1.3-1_amd64.deb

Prerequisites on all platforms:

  • LLVM 22+ recommended (16+ may work when find_package(LLVM) succeeds)
  • CMake 3.10+ and Ninja
  • A C++23 compiler (Clang recommended)
  • PCRE2 (optional — enables Std\Regex)
Terminal window
sudo dnf install llvm llvm-devel llvm-libs llvm-static \
clang lld lld-devel cmake ninja-build pcre2-devel cli11-devel \
libxml2-devel doctest-devel pkgconf
git clone https://github.com/yona-lang/yonac-llvm.git
cd yonac-llvm
cmake --preset x64-release-linux
cmake --build --preset build-release-linux
Terminal window
sudo apt install llvm-dev clang lld liblld-dev libpolly-dev cmake ninja-build \
libpcre2-dev libcli11-dev libxml2-dev doctest-dev pkg-config
git clone https://github.com/yona-lang/yonac-llvm.git
cd yonac-llvm
cmake --preset x64-release-linux
cmake --build --preset build-release-linux
Terminal window
brew install llvm lld cmake ninja pcre2 cli11 doctest pkgconf
git clone https://github.com/yona-lang/yonac-llvm.git
cd yonac-llvm
cmake --preset x64-release-macos
cmake --build --preset build-release-macos

Windows presets (x64-debug, x64-release) use Ninja with Clang from a prebuilt clang+llvm-*-x86_64-pc-windows-msvc archive, plus the MSVC toolset for the linker and Windows SDK. Extract the LLVM archive to a short path and set LLVM_INSTALL_PREFIX to its root (the directory containing bin, lib, include). The archive must be the complete tree — a Clang-only installer omits libraries that find_package(LLVM) requires.

See INSTALL.md in the repository for the full Windows walkthrough, GPU/Vulkan options, and troubleshooting.

Std\GPU works everywhere with a CPU fallback. For Vulkan execution, configure with -DYONA_ENABLE_VULKAN=ON and install a Vulkan loader (Fedora: vulkan-devel vulkan-loader-devel; macOS: MoltenVK via Homebrew). Details: Accelerators.

Continue to the quick start.