The meaning of Rust versions

What is the meaning of the Rust's version number ? Is it semver?
I know that libraries in crates.io should (or must I don't remember) use semver versioning, but what's about the Rust language itself ?

Yes, the Rust version number is intended to understood as a semver version number. The major version component has been set at 1 since stabilisation in 2015, and doesn't change due to Rust's stability guarantees (I don't know if they would ever do another major version bump in the future). The minor version component increases in line with Rust's 6 week release cycle and represents new features being added in a backwards-compatible fashion. The patch version component is increased as needed for bug fix versions between normal releases (the current version 1.84.1 is an example of such a bug fix release, the blog post for the release just mentions fixes of regressions and issues in builds from source).

4 Likes

On top of @jameseb7's anwer, you might be interested in learning about Rust editions: What are editions? - The Rust Edition Guide.

1 Like

Thanks for taking the time to answer.

Now my question for you @jamesb7 is : how do you know ? where does someone could know this information ?

is the relevant blog post about the stability guarantee.

6 Likes

I've read the blog post : the answer is not in it.

The guarantees are spelled out more formally in RFCs 1105 and 1122.

In particular 1105's motivation section contains the statement:

Both Rust and its library ecosystem have adopted semver, a technique for versioning platforms/libraries partly in terms of the effect on the code that uses them.

This confirms that, prior to the RFC's adoption, Rust's version number was de facto conformant to the semver standard, but this is the first official acknowledgment that I could find.

2 Likes