Installation
Every installation provides two executables:
yonac— the compiler. Compiles.yonasource to native executables, object files, or LLVM IR.yona— the REPL, in compile-and-run mode.
Packages (recommended)
Section titled “Packages (recommended)”| 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:
yonac -e 'let fib n = if n <= 1 then n else fib (n-1) + fib (n-2) in fib 10'# => 55macOS notes
Section titled “macOS notes”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:
brew install akovari/tap/yona --with-vulkanUbuntu note
Section titled “Ubuntu note”PPA builds compile from source on Launchpad. If your series has no published
package yet, build a binary .deb from a release tarball:
./dist/debian/build-deb-from-release.sh 0.1.3 amd64sudo apt install ./dist/debian/yona_0.1.3-1_amd64.debBuilding from source
Section titled “Building from source”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)
Fedora / RHEL
Section titled “Fedora / RHEL”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.gitcd yonac-llvmcmake --preset x64-release-linuxcmake --build --preset build-release-linuxUbuntu / Debian
Section titled “Ubuntu / Debian”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.gitcd yonac-llvmcmake --preset x64-release-linuxcmake --build --preset build-release-linuxbrew install llvm lld cmake ninja pcre2 cli11 doctest pkgconf
git clone https://github.com/yona-lang/yonac-llvm.gitcd yonac-llvmcmake --preset x64-release-macoscmake --build --preset build-release-macosWindows
Section titled “Windows”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.
Optional: GPU runtime
Section titled “Optional: GPU runtime”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.