Install Fly
Fly 0.16.0
Download for your platform:
Release notes SHA256SUMS Documentation for this version All releases on GitHub
All Platforms
| Platform | Architecture | Version | |
|---|---|---|---|
Installation Notes
Fly is in pre-release: expect breaking changes between versions.
What's in the archive
Releases 0.14.x and later are self-contained. The archive has bin/ and lib/ at its root, with no
enclosing folder, so unpack it into a directory of its own.
| Folder | Contents |
|---|---|
bin/ | fly, fly-lsp, fly-registry, the linker (ld.lld) and lldb |
lib/ | the runtime, the standard library and its headers |
Built from release/0.17.X, the compiler is a dynamic library, fly_compiler, which
fly and fly-lsp load at start-up, with the shared runtime fly_runtime. On Windows
both are in bin/, next to fly.exe (fly_compiler.dll, fly_runtime.dll). On Linux
and macOS they are in lib/ (fly_compiler.so, libfly_runtime.so; .dylib on macOS).
Keep the archive's layout as it is: fly finds them there by itself, with nothing to
add to PATH or to the loader path.
The commands below install Fly in ~/fly (%USERPROFILE%\fly on Windows). For another version, change VERSION.
Linux (x86_64)
VERSION=0.16.0
mkdir -p ~/fly
tar -xzf fly-$VERSION-linux-x86_64.tar.gz -C ~/fly
echo 'export PATH="$HOME/fly/bin:$PATH"' >> ~/.profile
export PATH="$HOME/fly/bin:$PATH"
fly --versionmacOS (Apple Silicon)
VERSION=0.16.0
mkdir -p ~/fly
tar -xzf fly-$VERSION-macos-arm64.tar.gz -C ~/fly
echo 'export PATH="$HOME/fly/bin:$PATH"' >> ~/.zprofile
export PATH="$HOME/fly/bin:$PATH"
fly --versionWindows (x64, PowerShell)
No Visual Studio is needed to use Fly.
$VERSION = "0.16.0"
Expand-Archive "fly-$VERSION-win-x64.zip" -DestinationPath "$HOME\fly"
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$HOME\fly\bin;$userPath", "User")
$env:Path = "$HOME\fly\bin;$env:Path"
fly --versionVerify the download
Every release publishes a SHA256SUMS file next to the archives. Download it into the same folder as the
archive, then:
sha256sum -c SHA256SUMS --ignore-missing # Linux
shasum -a 256 -c SHA256SUMS --ignore-missing # macOS# Windows: compare with the line in SHA256SUMS
(Get-FileHash "fly-$VERSION-win-x64.zip").Hash.ToLower()
Build from Source
Each version builds from its own git tag, with the toolchain of its time. Pick the version to see its instructions.
Build Fly 0.15.2
Fly 0.15.2 builds itself in three stages, starting from the pinned seed Fly 0.14.9, the last 0.14.x release:
| Stage | What happens |
|---|---|
| 0 | downloads the pinned seed (Fly 0.14.9) and LLVM into build/ |
| 1 | the seed compiles runtime, std and compiler from this tree and links the first fly; the suites then run under it |
| 2 | that fly recompiles the runtime and the compiler, builds the tools and runs every guard; build/stage2 is what a release ships |
The seed version is pinned in ci/linux/stage0.sh and ci/windows/stage0.ps1.
You don't need a system LLVM or sudo. Everything LLVM-related comes from the
LLVM archive that stage 0 downloads into build/llvm (upstream LLVM 20.1.8, built by
fly-lang/llvm).
Linux
Requires gcc and libc6-dev (for the C start-up objects), ar and objcopy.
git clone --branch v0.15.2 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh # sourced: it exports PATH and the library paths
./ci/linux/stage1.sh
./ci/linux/stage2.shmacOS (Apple Silicon)
Requires the Xcode Command Line Tools (xcode-select --install) for the macOS SDK
that programs link against. The same POSIX scripts as Linux are used; Homebrew is
not needed.
git clone --branch v0.15.2 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh
./ci/linux/stage1.sh
./ci/linux/stage2.shWindows
Requires PowerShell 7 (pwsh). The scripts do not run under Windows PowerShell 5.1.
You don't need Visual Studio to build Fly or to use it, because programs link against
a bundled llvm-mingw / UCRT sysroot.
git clone --branch v0.15.2 --config core.autocrlf=false https://github.com/fly-lang/fly.git
cd fly
. .\ci\windows\stage0.ps1
.\ci\windows\stage1.ps1
.\ci\windows\stage2.ps1
The result is build/stage2/bin/fly (fly.exe on Windows).
Useful switches
| Environment variable | Effect |
|---|---|
FLY_BUNDLE_LLVM=1 | make each stage self-contained: LLVM, the linker and lldb next to fly (what CI and releases use) |
FLY_STAGE1_TESTS=0 | skip the stage 1 suites for a faster local build |
FLY_DEBUG_SYMBOLS=1 | DWARF in the stage 1 build |
STAGE=1 / STAGE=2 | select the stage for a single ci/*/build_* or ci/*/test_* script |
Run the tests
STAGE=2 ./ci/linux/test_runtime.sh # the runtime layer
STAGE=2 ./ci/linux/test_std.sh # the standard library
STAGE=2 ./ci/linux/test_compiler.sh # the compiler and the driver
The Windows scripts have the same names under ci\windows\, with a .ps1 extension.
Build Fly 0.16.0
Fly 0.16.0 builds itself in stages, starting from the pinned seed Fly 0.15.2, the previous self-host release. Every stage after the seed is fly build on the repository's Manifest.fly:
| Stage | What happens |
|---|---|
| 0 | downloads the pinned seed (Fly 0.15.2) and LLVM into .fly/bootstrap/ |
| 1 | the seed's fly build compiles runtime, std, compiler and driver from this tree and links the first fly; the suites then run under it |
| 2 | that fly builds the whole toolchain again, tools included, and runs every guard; .fly/bootstrap/stage2 is what a release ships |
| 3 | optional: stage 2 rebuilds the compiler, which must be byte-identical (the fixpoint) |
The seed version is pinned in ci/linux/stage0.sh and ci/windows/stage0.ps1.
You don't need a system LLVM or sudo. Everything LLVM-related comes from the
LLVM archive that stage 0 downloads into .fly/bootstrap/llvm (upstream LLVM 20.1.8, built by
fly-lang/llvm).
Linux
Requires gcc and libc6-dev (for the C start-up objects), ar and objcopy.
git clone --branch v0.16.0 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh # sourced: it exports PATH and the library paths
./ci/linux/stage1.sh
./ci/linux/stage2.sh
./ci/linux/stage3.sh # optional: the fixpoint checkmacOS (Apple Silicon)
Requires the Xcode Command Line Tools (xcode-select --install) for the macOS SDK
that programs link against. The same POSIX scripts as Linux are used; Homebrew is
not needed.
git clone --branch v0.16.0 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh
./ci/linux/stage1.sh
./ci/linux/stage2.shWindows
Requires PowerShell 7 (pwsh). The scripts do not run under Windows PowerShell 5.1.
You don't need Visual Studio to build Fly or to use it, because programs link against
a bundled llvm-mingw / UCRT sysroot.
git clone --branch v0.16.0 --config core.autocrlf=false https://github.com/fly-lang/fly.git
cd fly
. .\ci\windows\stage0.ps1
.\ci\windows\stage1.ps1
.\ci\windows\stage2.ps1
The result is .fly/bootstrap/stage2/bin/fly (fly.exe on Windows).
Useful switches
| Environment variable | Effect |
|---|---|
FLY_BUNDLE_LLVM=1 | make each stage self-contained: LLVM, the linker and lldb next to fly (what CI and releases use) |
FLY_STAGE1_TESTS=0 | skip the stage 1 suites for a faster local build |
FLY_DEBUG_SYMBOLS=1 | DWARF in every stage |
STAGE=1 / STAGE=2 | select the stage for a single ci/*/test_* script |
Run the tests
STAGE=2 ./ci/linux/test_runtime.sh # the runtime layer
STAGE=2 ./ci/linux/test_std.sh # the standard library
STAGE=2 ./ci/linux/test_compiler.sh # the compiler and the driver
The Windows scripts have the same names under ci\windows\, with a .ps1 extension.
Build Fly 0.15.0
Fly 0.15.0 builds itself in three stages, starting from the pinned seed Fly 0.14.9, the last 0.14.x release:
| Stage | What happens |
|---|---|
| 0 | downloads the pinned seed (Fly 0.14.9) and LLVM into build/ |
| 1 | the seed compiles runtime, std and compiler from this tree and links the first fly; the suites then run under it |
| 2 | that fly recompiles the runtime and the compiler, builds the tools and runs every guard; build/stage2 is what a release ships |
The seed version is pinned in ci/linux/stage0.sh and ci/windows/stage0.ps1.
You don't need a system LLVM or sudo. Everything LLVM-related comes from the
LLVM archive that stage 0 downloads into build/llvm (upstream LLVM 20.1.8, built by
fly-lang/llvm).
Linux
Requires gcc and libc6-dev (for the C start-up objects), ar and objcopy.
git clone --branch v0.15.0 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh # sourced: it exports PATH and the library paths
./ci/linux/stage1.sh
./ci/linux/stage2.shmacOS (Apple Silicon)
Requires the Xcode Command Line Tools (xcode-select --install) for the macOS SDK
that programs link against. The same POSIX scripts as Linux are used; Homebrew is
not needed.
git clone --branch v0.15.0 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh
./ci/linux/stage1.sh
./ci/linux/stage2.shWindows
Requires PowerShell 7 (pwsh). The scripts do not run under Windows PowerShell 5.1.
You don't need Visual Studio to build Fly or to use it, because programs link against
a bundled llvm-mingw / UCRT sysroot.
git clone --branch v0.15.0 --config core.autocrlf=false https://github.com/fly-lang/fly.git
cd fly
. .\ci\windows\stage0.ps1
.\ci\windows\stage1.ps1
.\ci\windows\stage2.ps1
The result is build/stage2/bin/fly (fly.exe on Windows).
Useful switches
| Environment variable | Effect |
|---|---|
FLY_BUNDLE_LLVM=1 | make each stage self-contained: LLVM, the linker and lldb next to fly (what CI and releases use) |
FLY_STAGE1_TESTS=0 | skip the stage 1 suites for a faster local build |
FLY_DEBUG_SYMBOLS=1 | DWARF in the stage 1 build |
STAGE=1 / STAGE=2 | select the stage for a single ci/*/build_* or ci/*/test_* script |
Run the tests
STAGE=2 ./ci/linux/test_runtime.sh # the runtime layer
STAGE=2 ./ci/linux/test_std.sh # the standard library
STAGE=2 ./ci/linux/test_compiler.sh # the compiler and the driver
The Windows scripts have the same names under ci\windows\, with a .ps1 extension.
Build Fly 0.14.9
Fly 0.14.9 builds itself in three stages, starting from the pinned seed Fly 0.13.19, the C++ reference compiler (release/0.13.X):
| Stage | What happens |
|---|---|
| 0 | downloads the pinned seed (Fly 0.13.19) and LLVM into build/ |
| 1 | the seed compiles runtime, std and compiler from this tree and links the first fly; the suites then run under it |
| 2 | that fly recompiles the runtime and the compiler, builds the tools and runs every guard; build/stage2 is what a release ships |
The seed version is pinned in ci/linux/stage0.sh and ci/windows/stage0.ps1.
You don't need a system LLVM or sudo. Everything LLVM-related comes from the
LLVM archive that stage 0 downloads into build/llvm (upstream LLVM 20.1.8, built by
fly-lang/llvm).
Linux
Requires gcc and libc6-dev (for the C start-up objects), ar and objcopy.
git clone --branch v0.14.9 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh # sourced: it exports PATH and the library paths
./ci/linux/stage1.sh
./ci/linux/stage2.shmacOS (Apple Silicon)
Requires the Xcode Command Line Tools (xcode-select --install) for the macOS SDK
that programs link against. The same POSIX scripts as Linux are used; Homebrew is
not needed.
git clone --branch v0.14.9 https://github.com/fly-lang/fly.git
cd fly
. ./ci/linux/stage0.sh
./ci/linux/stage1.sh
./ci/linux/stage2.shWindows
Requires PowerShell 7 (pwsh). The scripts do not run under Windows PowerShell 5.1.
You don't need Visual Studio to build Fly or to use it, because programs link against
a bundled llvm-mingw / UCRT sysroot.
git clone --branch v0.14.9 --config core.autocrlf=false https://github.com/fly-lang/fly.git
cd fly
. .\ci\windows\stage0.ps1
.\ci\windows\stage1.ps1
.\ci\windows\stage2.ps1
The result is build/stage2/bin/fly (fly.exe on Windows).
Useful switches
| Environment variable | Effect |
|---|---|
FLY_BUNDLE_LLVM=1 | make each stage self-contained: LLVM, the linker and lldb next to fly (what CI and releases use) |
FLY_STAGE1_TESTS=0 | skip the stage 1 suites for a faster local build |
FLY_DEBUG_SYMBOLS=1 | DWARF in the stage 1 build |
STAGE=1 / STAGE=2 | select the stage for a single ci/*/build_* or ci/*/test_* script |
Run the tests
STAGE=2 ./ci/linux/test_runtime.sh # the runtime layer
STAGE=2 ./ci/linux/test_std.sh # the standard library
STAGE=2 ./ci/linux/test_compiler.sh # the compiler and the driver
The Windows scripts have the same names under ci\windows\, with a .ps1 extension.
Build Fly 0.13.19
Fly 0.13.19 is the C++ reference compiler, frozen at this version. It seeds the 0.14.x self-host, so you build it to rebuild the whole chain of seeds from source (0.13.19 builds 0.14.x, 0.14.9 builds 0.15.x, and so on). It builds with CMake.
Requires CMake 3.24 or later and a C++17 compiler. The configure step downloads the precompiled LLVM 20.1.8 archive for your platform from fly-lang/llvm into the build directory.
Linux
Install the build dependencies for your distribution:
# Debian / Ubuntu
sudo apt install build-essential libxml2-dev zlib1g-dev libtinfo-dev
# Fedora / RHEL / CentOS Stream
sudo dnf install gcc gcc-c++ make libxml2-devel zlib-devel ncurses-devel
# openSUSE
sudo zypper install gcc gcc-c++ make libxml2-devel zlib-devel ncurses-devel
# Arch Linux
sudo pacman -S base-devel libxml2 zlib ncurses
For stacktrace support (for debugging), also install binutils-dev libdw-dev libdwarf-dev
(Debian / Ubuntu) or binutils-devel elfutils-devel libdwarf-devel (Fedora / RHEL).
git clone --branch v0.13.19 https://github.com/fly-lang/fly.git
cd fly
mkdir build && cd build
cmake ..
cmake --build .
ctest # run from the build directorymacOS (Apple Silicon)
xcode-select --install
brew install cmake libxml2 zlib
git clone --branch v0.13.19 https://github.com/fly-lang/fly.git
cd fly
mkdir build && cd build
cmake ..
cmake --build .
ctestWindows
Requires Visual Studio (MSVC) and vcpkg. Only the C++ reference compiler needs Visual Studio. The self-hosted releases from 0.14 onwards don't.
git clone --branch v0.13.19 --config core.autocrlf=false https://github.com/fly-lang/fly.git
vcpkg install zstd:x64-windows
cd fly
mkdir build; cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake"
cmake --build . --config Release
ctest -C Release
The result is build/bin/fly (fly.exe on Windows).