Oleksandr Novik
Oleksandr Novik

Reputation: 738

Rust nightly vs beta version

I am trying to understand the difference between rust nightly and the beta version. They both seem to be suitable for cases when one needs to use experimental features, but I can't really find the exact difference.

Upvotes: 6

Views: 1945

Answers (1)

rodrigo
rodrigo

Reputation: 98348

In the Rust ecosystem, these are called channels. There are three official channels:

  • Stable: this is the default one, that most people should use normally. As its name implies, stability is the main feature.
  • Beta: this is a preview for the next version of Rust. The main idea is that you add it to your CI, testings or whatever, so you can discover any issue that new Rust developments may cause to your code, and report them back to the Rust team. You can also use it to preview future improvements to the language or the standard library, of course, but it will not let you use unstable features.
  • Nightly: this is build every day (or night), so it shows the bleeding edge version of the Rust code base. As such it may show random bugs or changes in behavior from one version to the next. But it allows you to use unstable features. Some people avoid the random bug issue by pinning their project to a particular known-good nightly version, by specifying the date.

To sum up: use stable to do normal work; use nightly to experiment with unstable features; use beta to test the next Rust version and get ahead of possible future problems.

Upvotes: 10

Related Questions