When will Rust be formally specified ?

When will Rust be formally specified ?

The sooner a language is formally specified and standardized, the better. I asked when. The answer is still: not yet.

I wrote this in December 2019. I did not want Rust to go the way of Ruby (a spec, late) or Clojure (still none). Delay means crates for problems that belong in the language. A spec would inform crate design, cut ambiguity, and allow more than one toolchain. It is inevitable for any widely used language. The only question is when. The period of ambiguity should end.

Seven years later the project has started the paperwork. It has not ended the period of ambiguity.

2019

The Rust Reference was not a specification then. It still says it is the primary reference, and it still is not a contract. If the compiler and the text disagree, you file an issue so someone can think about which is correct. That is rustc as the language.

I had mixed conversations with core people on two points: whether an official spec was even required, and why error handling — an example of core functionality — needed real attention. Not a good sign. The language survey is a popularity contest. I do not always want the designer adding things by vote.

The top languages had formal specs. Even Ruby. Even PHP. Correlation is not causation. Formalizing sooner is still better than later. RustBelt exists, and verification of safety is a separate, necessary undertaking. I hoped a spec would come out of that work. wg-grammar had been open since 2015, with an RFC that admitted a period of ambiguity in which neither the implementation nor src/grammar was canonical.

It was time for that period to end.

Ada was designed from a specification. That is the Steelman bar. Rust was not.

What happened

December 2022: RFC 3355, Start working on a Rust specification. Merged July 2023. The RFC is explicit that helping alternative implementations is not a primary goal. Unlike C or C++, this document would not say when a compiler may call itself a Rust compiler. It would describe what rustc does. rustc remains the language.

March 2025: Ferrous Systems donated the Ferrocene Language Specification to the project. It lives at rust-lang/fls. It was written so a qualified toolchain could be certified. It is structured like an Ada spec: legality rules, numbered statements, a glossary. The project’s own README says the FLS is not intended as the normative specification of Rust. Differences from rustc are treated as errors in the FLS.

So: a qualification document, now under the project, that defers to the compiler. That is progress toward a document. It is not a spec that other implementations can be measured against, and it is not standardization.

The rest of the 2019 bet:

2019 2026
wg-grammar since 2015 grammar work folded into the Reference; still not canonical over rustc
RustBelt still research; MiniRust (opsem) and a-mir-formality (types/MIR) are models, not the spec
multiple toolchains gccrs exists, still experimental, still chasing rustc; RFC 3355 is not written for it
Clojure has no spec still none
Ruby got a spec late still the cautionary tale
Microsoft Verona did not become the fork. The spec gap did not need a fork to stay a gap

Crates still absorb what the language will not nail down. Error handling is still a crate ecosystem. Six-week releases still outrun any document that is not rustc.

When

I said it was inevitable. RFC 3355 agrees it should exist. The FLS is the first document the project will admit to owning that looks like a specification.

A specification that is not allowed to win a fight with rustc, and that is not written so a second compiler can be a Rust compiler, is not what I asked for in 2019. It is rustc with footnotes.

The period of ambiguity has not ended. The question is still when.

References