← Back to context

Comment by revskill

2 months ago

What does nightly mean ? I hate that you could not know a specific version of a nightly.

The master branch of the Rust repo is built every night and distributed. That's a nightly build. Most people are on the stable release, which is updated every six weeks.

A minority use the nightly build for various reasons: a feature that hasn't reached stable yet, or because they want to help test the nightly releases and prevent bugs from reaching stable.

  • Is it a minority? Are there stats posted for this?

    Only recently have I had some projects switching to stable after their required features stabilized.

    • > Only recently have I had some projects switching to stable after their required features stabilized.

      While this used to be very common back then (in 2016-18 many things where progressively stabilized and you had cornerstone libraries switching to stable at almost every release) it hasn't been so for the past 5 years.

      Rust gets way less “exciting” new features nowadays, as the language has settled a lot (there are still moving parts, but they are the minority not the norm).

You can pin versions with the rust-toolchain.toml file you need to be using Rustup afaik. Nightly is just the daily builds.

  • I assume any "nightly" version would work in this context, meaning it would not refer to a version from a year ago, as it would have already been made stable by that point, right?

    • "nightly" versions also allow to use unstable features, and unstable features may remain so for a very long time (potentially forever) without breaking, so an old nightly could maybe work

      4 replies →

    • A lot of people pin a specific nightly since the feature they're depending on could change (or ostensibly it would be in stable), so they can keep working without continuously having to track nightly changes or deal with it breaking on a different system with a different nightly version.

      That obviously only works for non-library uses of nightly.

It's a bit unfortunate wording but it basically requires any nightly toolchain version. It uses `std::intrinsics::breakpoint()` which is a compiler intrinstic. This has been available for a long time, but afaik will never be exposed on a stable toolchain.

Per https://dev-doc.rust-lang.org/nightly/unstable-book/library-...

>This feature is internal to the Rust compiler and is not intended for general use.