Toolchain
mix_gale manages the Gale compiler for your Mix project. Start with the
Quick Start to add Gale to a project; use this page to
check platform requirements or configure a compiler.
Supported platforms
Section titled “Supported platforms”Gale targets Elixir 1.20 on OTP 28 or newer. Prebuilt compilers support:
| Platform | Requirements |
|---|---|
| Linux x86_64 | glibc 2.39 or newer, such as Ubuntu 24.04 |
| macOS arm64 | Apple Silicon |
Prebuilt compilers are not yet available for Linux arm64, Intel macOS, musl, or Windows.
Compiler versions
Section titled “Compiler versions”mix_gale and the compiler share a version. When you run mix compile,
mix_gale downloads the compiler with its exact Mix project version and verifies
the download against its SHA-256 checksum. It reuses the installed compiler
on subsequent builds.
To upgrade the toolchain, update the Git ref in mix.exs or run
mix deps.update mix_gale gale_std when tracking main, then commit the
updated mix.lock. The next compilation uses the compiler version declared by
the selected mix_gale commit.
Each Gale release also declares one exact proof toolchain. Gale 0.1.0 supports
Why3 1.8.2 and Z3 4.16.0. Run gale version for the human-readable contract or
gale version --json for tooling. Compiler-library users can read
Gale.proof_toolchain. gale verify checks both tools before proving and
reports an error for any other version; Gale libraries do not select solver
versions or contain compatibility branches.
The repository’s locked Nix development shell installs the supported pair and asserts their versions. Users who manage packages another way install the exact versions reported by their Gale executable. A future solver upgrade is a Gale release change: update the Nix lock/package assertions, the release metadata, and the proof regression suite together.
Find the compiler
Section titled “Find the compiler”Run this from your project to print the compiler’s executable path:
mix gale.pathThe command downloads the matching compiler if needed. Use the resulting path when configuring an editor or another tool that needs the compiler executable.
Use a local compiler
Section titled “Use a local compiler”To use a compiler you built yourself, add compiler_path to the gale
configuration in your mix.exs project settings:
gale: [compiler_path: "/absolute/path/to/gale"]This setting takes precedence over the managed compiler and skips its download.
Keep the local compiler compatible with your project’s mix_gale version.
Mix does not search PATH or read a compiler-path environment variable
automatically. To configure the path through your environment, set it explicitly:
gale: [compiler_path: System.get_env("GALE_COMPILER_PATH")]When the variable is unset, Mix uses the managed compiler.