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.
Seed or self-host?
Fly has two compilers: the C++ seed (0.13.x) and the self-host (0.14.x) — see Building Fly. Every change must choose one. The rule:
The seed is frozen at what is indispensable to compile the 0.14.x tree. It is changed only for a miscompile or crash that affects the tree, for an ABI or file-format constraint the shipped artifacts inherit from it, or for syntax the tree needs. Every new feature, check, warning and library goes into the self-host only.
The seed may accept more than the self-host — it only ever compiles code that has already been validated — but never less. The end state is the one Rust and Go reached: the seed of version N is the released self-host of version N−1, and the C++ compiler becomes the historical root of the chain rather than a dependency of every build.
Phase 0 — Truth
The compiler does what the documentation says.
Status: done in 0.14.7. The self-hosted compiler now enforces every rule the seed enforces, plus
conston locals, parameters and fields,privateon methods, and unique signatures within a file. Every one of them has a probe in the blockingtest_semaguard, which also runs each probe through the seed. A non-boolcondition and code after areturnget a diagnostic instead of an internal error, and a semantic error is reported in its own file. Options with no effect say so. The seed archive is checked against a pinned SHA-256 before use, and a release publishesSHA256SUMS. Carried into phase 1: verifying the LLVM archive the same way, and running the stage 3 fixpoint check on every build rather than only on releases.
- Semantic parity. The self-host accepts programs the seed rejects:
implicit narrowing, access to
privatemembers, instantiating anabstractclass, overriding afinalmethod,breakoutside a loop, redeclaring a variable,string + int. Each becomes a compile error again. constis enforced for locals, parameters and fields; two functions with an identical signature are an error.- No internal errors: unreachable code after
returngets a diagnostic. - A blocking differential suite: one corpus of valid and invalid programs, one expected verdict, run against both compilers on every build.
- No silent options: a flag that is accepted is implemented.
- Verified downloads: the seed and LLVM archives are pinned by SHA-256; releases publish checksums.
Exit: the conformance table has no "not enforced" row that the seed enforces.
Phase 1 — A complete bootstrap
Everything that ships is built by Fly, and the build proves it.
- The self-host adopts the reference class layout, so the standard library is compiled by the self-host instead of being carried over from the seed.
- The runtime's C primitives are built from sources in the tree, or ported to Fly; no object file is inherited from the seed.
- Stage 3: the released compiler recompiles itself and the result is compared bit for bit — the fixpoint is demonstrated on every build. (Runs on release builds since 0.14.7.)
- Reproducible builds: two clean builds produce identical artifacts.
- Debug information from the self-host, so the bundled
lldbresolves source lines. - Bootstrap without elevated privileges; CI for Linux aarch64. macOS is out of scope for now: there is no Mac to test on and no macOS runner available to the project.
- The seed becomes the previous self-host release.
Exit: stage2 == stage3 on the three supported targets (Linux x86_64 and
aarch64, Windows x64); the release contains no artifact
compiled by the C++ seed.
Phase 2 — A safe language
A program that compiles does not fail silently. All of this lands in the self-host only.
- Errors cannot be ignored. Today a
failin a called function lets the caller continue with a zero value. The call will have to be handled or propagated; propagation becomes the default andhandleis what stops it. This is the most consequential change on the roadmap and will be introduced behind an edition switch. - Warnings. Unused variables and imports, shadowing, unreachable code,
lossy conversions, non-exhaustive
switchover an enum. - Conversions. Widening is implicit; narrowing needs an explicit cast.
- Null safety. Class references are non-null unless declared nullable, and a nullable must be checked before use.
- Diagnosed traps. Division by zero and a null dereference stop the program with a message and a source position, not a bare crash; integer overflow traps in debug builds.
switchwithout implicit fall-through.- Deterministic release of resources, replacing the "remember to call
free()" convention. - Operator precedence: mixing bitwise, shift and comparison operators — or
&&with||— without parentheses becomes an error instead of a surprise. - Strings: escape sequences in ordinary literals, explicit raw literals, and a UTF-8 model with distinct byte and code-point APIs.
- Generics: generic methods, explicit type arguments, and internal calls inside generic classes.
- An
unsafeboundary around raw memory, pointer arithmetic and the runtime intrinsics. - Then power: first-class functions and closures, bounded generic interfaces, pattern matching over enums.
Exit: no undefined or unchecked behaviour is reachable outside unsafe.
Phase 3 — A coherent standard library
One model, applied everywhere. 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 reports failure with
failand documented codes. Sentinel values,errOutparameters and silent zero values go away; an out-of-rangeList.getfails. - Typed handles.
Socket,TlsConn,JsonValue,PollSet,Processreplace opaquepointerandlongvalues. - Collections. Iteration over every container, sorting, searching,
keys()/values(); a balancedTree; seeded hashing. - Text.
split,join, formatting, number parsing, a string builder, UTF-8. - Networking. IPv6 and
getaddrinfo; typed HTTP requests and responses with size limits; one client that selects 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 JSON and inflate decoders.
- Concurrency.
join, condition variables, public atomics, channels; the thread-safety of every type documented. - 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; an automated check that every public function is documented.
Exit: no public function reports failure by a sentinel or a silent default.
Phase 4 — Ecosystem and 1.0
- A formatter, a documentation generator, test coverage.
- 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.
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 outside
unsafe. - The standard library uses a single error model.
- The documentation is generated from, and verified against, the sources.