tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: py-pydantic* dependencies



* On 2025-04-22 at 11:24 BST, Havard Eidnes wrote:

"Classic!"  No mention of what "rust stable" or "rust nightly"
actually is in terms of versions, and no mention of when this was
uttered.

"stable" is released versions of rust. "nightly" is the latest version of rust, built every day (hence the name), that also enables features that have not yet made it into stable rust.

Often developers may have additional features or experimental options that depend on nightly unstable features, in which case they will only work if you have a nightly compiler.

There are lots of unstable features, some of which have remained unstable for a long time, because once something migrates to stable then it is committed to be supported forever, so obviously that only happens once it has been thoroughly vetted.

It is generally assumed that end-users will not have a nightly compiler installed, so released software will usually not depend on any nightly features in the default configuration.

In every rust release there is a changelog section "Stabilized APIs". These are all of the features that were previously only available in the nightly compiler that are now available for use in stable from that release onwards.

Rust software should ideally specify an MSRV, i.e. the earliest version of rust that supports all of the features that the software uses. You can check for this in the "rust-version" key in Cargo.toml, for example my mktool utility has an MSRV of rust 1.74.0:

  https://github.com/jperkin/mktool/blob/main/Cargo.toml#L12

If you are developing rust software then there are tools that can help you determine what the MSRV is.

Some authors like myself will try to keep the MSRV as low as possible without affecting functionality. Other authors will be more aggressive in their use of new stable features, given that the vast majority of users will be running the latest stable release.

Hope that helps,

--
Jonathan Perkin                    pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index