Install Fly
Fly 0.15.2
Download for your platform:
Release notes SHA256SUMS Documentation for this version All releases on GitHub
All Platforms
| Platform | Architecture | Version | |
|---|---|---|---|
Notes
- A self-hosted release archive (0.14.x and later) is self-contained:
bin/holdsfly,fly-lsp,fly-registry, the linker andlldb;lib/holds the runtime, the standard library and its headers. Unpack it anywhere and putbin/on yourPATH. - Linux / macOS:
tar -xzf fly-<version>-<platform>.tar.gz, then add the extractedbin/directory to yourPATH. - Windows: unzip the archive and add its
bin\folder to yourPATH. No Visual Studio is needed to use Fly. - Every release publishes a
SHA256SUMSfile next to the archives. - Fly is currently in pre-release. Expect breaking changes between versions.
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.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).