Roadmap to maturity
Fly compiles itself. The compiler, the runtime and the standard library are written in Fly, and the toolchain ships a language server, a package registry and a debugger. What separates the current release from a language people can depend on is not a list of missing features — it is trust: that the compiler enforces what the specification says, that the released binaries are built entirely by Fly, and that a program which compiles cannot fail silently.
Four principles decide every item below and settle conflicts in this order:
- Simplicity — one way to do a thing; no rule that surprises.
- Reliability — an error is never ignored by default.
- Security — unsafe operations are visible, bounded and opt-in.
- Power — added only once the first three hold.
The current status of every rule mentioned here is recorded in Conformance.
Where to follow it
The plan is tracked on GitHub, in the fly-lang/fly
repository: one milestone per phase, one epic issue per phase with the
checklist of its issues, and one issue per piece of work — done or to do. A
closed issue carries the release:* label of the first release that contains
it; the area:* labels say which part of the toolchain it touches.
| Phase | Status | Milestone | Epic |
|---|---|---|---|
| 0 — Foundations | done (v0.13.19) | Phase 0 | #241 |
| 1 — Bootstrapping | done (v0.14.9) | Phase 1 | #242 |
| 2 — Truth | done (v0.14.9) | Phase 2 | #229 |
| 3 — Sound bootstrap | done (v0.14.9 – v0.15.2) | Phase 3 | #230 |
| 4 — Safe language | done (v0.16.0) | Phase 4 | #231 |
| 4b — Power | planned | Phase 4b | #232 |
| 5 — Coherent std | planned, alongside phase 4 | Phase 5 | #233 |
| 6 — Ecosystem and 1.0 | planned | Phase 6 | #234 |
Releases: v0.13.19 (the last C++ seed), v0.14.9, v0.15.0, v0.15.2, v0.16.0.
The chain of seeds
Fly has two compilers in its history: the C++ seed, frozen at v0.13.19, and
the self-host written in Fly — see Building Fly.
The end state the plan set out to reach is the one Rust and Go reached, and it
is reached: the seed of a release line is the previous self-host release.
v0.13.19 built the 0.14 line, v0.14.9 built the 0.15 line, v0.15.2 builds the
0.16 line. Each line lives on its own release/<version>.X branch, so the whole
chain can be rebuilt in order from the C++ compiler. A change that needs a
different seed opens the next line; every new feature, check and library goes
into the self-host only.
Phase 0 — Foundations
A language and a compiler for it. Done — shipped in v0.13.19.
From 2021 the language takes shape in the C++ reference compiler, built on LLVM:
- Syntax: namespaces and imports, functions, braces for blocks,
//and/* */comments, no statement terminator, the operators,if/else,switch,whileandforloops. - Types: a static, strong type system; booleans, integers of every width,
floatanddouble, strings and arrays; classes with methods, structs as value types. - Errors and debugging: diagnostics instead of internal asserts, DWARF debug symbols.
- The first standard library: raw memory,
List,MapandQueue, math, threads and synchronisation — the modules the compiler needed to be rewritten in Fly. They first ship, compiled by the self-host, in v0.14.9.
Some ideas of the time did not stay: namespace-level variables were built and later removed, and variadic functions were left out. Each issue of this phase records what was really done and where the code lives today.
Phase 1 — Bootstrapping
Fly written in Fly. Done — shipped in v0.14.9.
The compiler, the runtime and the standard library are rewritten in Fly, with the LLVM C API bound directly from Fly. A staged bootstrap builds them: the C++ compiler, frozen at v0.13.19, compiles the self-host, which then rebuilds itself; making that chain sound on every platform is the work of phase 3.
Phase 2 — Truth
The compiler does what the documentation says. Done — shipped in v0.14.9.
- Semantic parity: the self-host rejects what the C++ seed rejected —
implicit narrowing,
privateaccess, instantiating anabstractclass, overriding afinalmethod,breakoutside a loop, redeclarations,string + int— and also enforcesconst,privatemethods and unique signatures. - A blocking semantic guard (
test_sema): every rule has a probe, judged by both compilers on every build. - No internal errors, no silent options: a non-
boolcondition or code after areturngets a diagnostic; an option with no effect says so. - The CI tells the truth: the seed is pinned in one place and verified by
SHA-256 before use, a failed stage 2 is fatal, releases publish
SHA256SUMS. - Documentation realigned with the compiler.
Phase 3 — A sound bootstrap
Everything that ships is built by Fly, and the build proves it. Done — shipped in v0.14.9, v0.15.0 and v0.15.2.
- One class layout and interface dispatch through per-class tables, so the standard library and the runtime that ship are compiled by the self-host — no object file comes from the seed.
- Stage 3 on every build: the released compiler recompiles itself and the object is compared byte for byte, on Linux x86_64, Windows x64 and macOS arm64.
- Reproducible builds, checked in CI: two clean builds give the same bytes.
- Debug information from the self-host — lines, parameters, locals, types,
class fields — so the bundled
lldbresolves source lines. - A bootstrap without privileges, the LLVM archives verified by SHA-256, and macOS arm64 as a supported platform.
- The seed becomes the previous self-host release.
Phase 4 — A safe language
A program that compiles does not fail silently. Done in v0.16.0.
Done:
- Errors cannot be ignored: a failure in a called function stops the caller
too, up to a
handleormain— always, with no switch and no annotation. - Diagnosed run-time faults, in every build: a null reference, a division by zero and an integer overflow stop the program with a message and a source position; an index out of range fails with its position; an access through a raw pointer that points nowhere and a stack overflow print what happened before the system ends the program.
- Deterministic release:
newrequiresdelete, written by the program; nothing is released at the end of a scope or on a failure, andfree()releases a class's fields.new unique,new sharedandweakwere removed (fly-lang/fly#321): they cost at run time in every program. - Warnings (
unused-variable,unused-import,shadow,lossy-conversion,non-exhaustive-switch,missing-const) with--warnings-as-errors; the tree builds with it. - Conversions: narrowing and signed-to-unsigned need a cast, also for arguments; mixed signed/unsigned comparisons are errors.
- No
switchfall-through; unambiguous precedence — mixing&&with||, or bitwise with comparison operators, needs parentheses. - Strings: escapes in ordinary literals, raw
"""…"""literals, a UTF-8 character API; nochartype. - Privileged namespaces instead of an
unsafekeyword:fly.llvmandfly.runtimeare reserved to the standard library and the toolchain; user code reaches raw memory throughfly.mem. - Fly builds itself with
fly build: the version lives inManifest.fly, every program can read its own manifest (fly.meta.package), and all three bootstrap stages arefly buildon the repository's own manifest — the result is a self-contained toolchain. voidis only a return type: a variable, a parameter, a field, an array element or a generic argument declaredvoidis an error.- The probes are suites: the programs that check what the compiler must
refuse, the run-time traps, the object report and the library boundary live
in
compiler/probes, and the suites ofcompiler/test/probesrun them on every system alike, in place of a PowerShell and a bash script each. - The driver is a package beside the compiler:
driver/libanddriver/testnext tocompiler/libandcompiler/test;flyis the driver linked with the compiler library, the same libraryfly-lsplinks, so the compiler's sources are compiled once per build. fly.metaships with the standard library: the manifest schema is a module ofstd/liblikefly.str, soimport fly.meta.*names a module the installed toolchain has.protectedis checked: a protected member is reachable from its class and every class derived from it, and is written only on class methods and attributes;privateandprotectedalso guard static members.constfields are read-only: astatic constkeeps its initializer, an instanceconstis set once by its own class's constructor; a receiver of a multi-assignment is checked like any other write.- Field initializers run: an instance field's when the object is created, before any constructor; a struct's wherever a value of it is made; a static field's is a constant folded into its initial value, or runs on the first use of the class's static fields.
To do: no implicit conversion to bool, constant overflow as a
compile-time error, and the remaining clean-ups — see the
milestone.
Exit: no undefined or unchecked behaviour is reachable from user code except
through fly.mem.
Phase 4b — Power
Expressive power, once safety holds. Planned. Every item the compiler's own sources want to use goes through a new seed release line.
- Functions as values: function types, lambdas and closures, with capture rules tied to the memory model — the prerequisite for sorting with a comparator, callbacks and threads.
- Complete generics: generic methods, explicit type arguments
f<int>(x), constraints (T : Comparable), generic interfaces,this.m()inside templates. - Algebraic data types and
match: enums with data, exhaustivematch;Option<T>andResult<T, E>next tofail. - Iteration:
Iterable/Iteratorforfor x in collover user types; ranges0..n. - Ergonomics: string interpolation, destructuring of multiple returns, compile-time constants.
- Concurrency: threads and channels (or async) in the standard library,
designed around
shared. - Modules and packages: module and package visibility, versioned
dependencies through
fly-registry. - Module names in lower case, so no two modules differ only by case.
Left out on purpose, for simplicity: operator overloading, reflection, multiple inheritance, macros.
Phase 5 — A coherent standard library
One model, applied everywhere. Planned, alongside phase 4. The library is already broad — sockets, TLS on two back ends, HTTP, JSON, gzip and tar in pure Fly, SHA-256. What it lacks is uniformity.
- One error model: every module fails with
failand documented codes; no sentinel values,errOutparameters or silent defaults. - Typed handles:
Socket,TlsConn,JsonValue,PollSet,Processinstead of opaquepointerandlongvalues. - Collections: iteration over every container, sorting, searching,
keys()/values(); a balancedTree; seeded hashing. - Text:
split,join, formatting, number parsing, a string builder. - Networking: IPv6 (names and addresses already go through
getaddrinfoandgetnameinfofrom 0.16.0); typed HTTP with size limits; one client that picks TLS from the URL scheme; a server loop. - Security: a cryptographic random source, HMAC, SHA-512, constant-time comparison; depth and expansion limits in the decoders.
- Concurrency:
join, condition variables, public atomics, channels. - Processes and time: pipes and in-memory capture, child environment and time-outs; time zones.
- New modules: formatting, regular expressions, argument parsing, cryptography, UUID, CSV.
- Quality: fuzzing of every parser, reference benchmarks, a check that every public function is documented.
Exit: no public function reports failure by a sentinel or a silent default.
Phase 6 — Ecosystem and 1.0
Planned.
- A documentation generator and test coverage (the formatter,
fly fmt, already ships); parallel builds infly build. - Signed packages and audited dependencies in the registry.
- A normative specification with a conformance suite as the source of truth.
- A stability policy: semantic versioning, editions for incompatible changes, deprecation with one release of notice.
- More platforms, starting with Linux aarch64, through the same chain.
Criteria for 1.0
- The stage 3 fixpoint holds on every supported target.
- The specification, the conformance suite and the compiler agree, with no undocumented divergence.
- No unchecked behaviour is reachable from user code except through
fly.mem. - The standard library uses a single error model.
- The documentation is generated from, and verified against, the sources.