Release cycle

From Rust Community Wiki
(Redirected from Nightly)
Jump to navigation Jump to search

See also: Reference – How Rust is Made and “Nightly Rust”

Rust has a six-week release cycle: Every six weeks, a new stable Rust version is released. Because Rust is committed to stability, these are minor versions (1.x.0) following Semantic Versioning.

Rust maintains three versions: Stable, Beta and Nightly. When a new Stable version is due, Beta becomes the new Stable and Nightly becomes the new Beta. A new Nightly version is released every day, including the very latest changes. Because of the release cycle, any change takes six to twelve weeks until it lands in Stable, giving the developers enough time to find and fix bugs. If a critical bug isn't found before it lands in Stable, the bug fix is usually backported, and a new Stable patch release (e.g. 1.43.1) is published.

The release cycle is derived from Firefox, which also has a stable, beta and nightly channel and used a six-week release cycle for a long time.

Rustup[edit | edit source]

Rustup is Rusts toolchain manager. Among other things, it can update the installed toolchain, install several toolchains side by side and change the default toolchain. It's even possible to install a specific Rust version, a specific Nightly build, or a custom toolchain.

For example, the following commands install Nightly (or update it, if it's already installed) and make it the default:

$ rustup install nightly
$ rustup default nightly

Nightly[edit | edit source]

Nightly Rust is intended for experimentation and for testing new language features. A new Nightly is released every day, shortly after midnight in UTC time[1] and includes the latest changes from the master branch.

Although Rust is tested extensively to catch bugs, Nightly might be buggy occasionally. Furthermore, tools such as rustfmt, clippy and miri might not be included in the latest Nightly toolchain, if they failed to build or didn't pass all tests. More information is available in the Rustup components history and Rust toolstate.

Nightly has a version of the form 1.x.0-nightly. To install a specific Nightly, rustup allows specifying the date, e.g. rustup install nightly-2020-06-01.

Nightly features[edit | edit source]

Nightly Rust allows the usage of opt-in nightly features. These include

  • Features that haven't been stabilized yet
  • Features that are not intended to be stabilized
  • Features that are incomplete or buggy
  • Features where it's not clear yet whether they should be stabilized, changed, or removed

Nightly features are enabled with the #[feature] attribute, in which a list of features can be specified:

#![feature(async_closure, const_loop)]

// Code here can use async closures
// and loops in const contexts

The standard library can use nightly features even on Beta and Stable. This is possible because it is built with the RUSTC_BOOTSTRAP environment variable set to 1. Doing the same with other crates is strongly discouraged.

Beta[edit | edit source]

Beta is more stable than Nightly, while offering improvements and new features earlier than Stable. Developers are encouraged to use Beta in order to find and report bugs; however, Beta is rarely used[2], whereas Nightly is more popular because of the nightly features.

It is possible to test against beta or nightly in CI systems to help Rust discover possible regressions.

Beta has a version of the form 1.x.0-beta.y, where y is an increasing number.

Stable[edit | edit source]

Stable is the recommended Rust version for most developers, and should be used in production if possible. Aside from patch releases, a new Stable version is released every six weeks. The expected release date of the next Stable release is displayed on the unofficial website What Rust is it?.

Stable has a version of the form 1.x.y, where x is the minor version that is incremented every six weeks, and y is the patch version.

A few days before each release, the release notes are updated on GitHub, and a pre-release is published, which can be installed with

$ RUSTUP_DIST_SERVER=https://dev-static.rust-lang.org rustup update stable

Shortly after each release, a blog post is published on the official Rust blog, which usually explains the more important changes in detail.

References[edit | edit source]