Rust 1.70.0 Released with Stability Features
Rust 1.70.0 was recently released, bringing with it features for more stability. The most important update is the activation of the so-called ‘sparse protocol’ for reading ‘crates.io index’ by default. This protocol should ensure that obtaining information from the index yields clear performance improvements.
Changes to Crate Cache
The new version of Rust changes the path to the crate cache, so that dependencies have to be downloaded again.
New Types and IsTerminal Feature
Two new shared data initialization types, OnceCell and OnceLock, have been introduced. These new types can be used anywhere where immediate construction is not a desired behavior. The stable new types replace previously used crates such as ‘lazy_static’ and ‘once-cell’.
The IsTerminal feature has also been introduced. This makes it possible to decide with the method ‘is-terminal’ whether a certain file descriptor or handle represents a terminal or so-called ‘TTY’. A crate functionality was already available for this too, but this feature is now built directly into the programming code.
Other New Features
It is now possible to name debug levels and the version no longer allows unstable test versions. As a result, it is no longer possible to choose different non-stable options for the command line.
Rust v1.70.0 also has 37 new stable APIs.