|Rust 1.72 Stabilizes APIs|
|Written by Kay Ewbank|
|Tuesday, 12 September 2023|
Rust 1.72 has been released with stabilized APIs as well as unlimited Const evaluation time.
Rust is popular for situations including being embedded in other languages, writing programs with specific space and time requirements, and writing low-level code.
The recent 1.72 version follows on from Rust 1.70 which was released in June with improvements including a move to enable Cargo's "sparse" protocol by default for reading the index from crates.io. Until this change, the git protocol cloned a repository that indexed all the crates available in the registry, but this began to cause noticeable delays while updating that repository. The new protocol provides a significant performance improvement when accessing crates.io, as it will only download information about the subset of crates that you actually use.
Three APIs have been stabilized in the current release - Send Sync (the sending half of Rust's synchronous ['sync_channel'] type); Try From for str (which tries to convert an &OsStr to a &str); andString::leak (which consumes and leaks aString, returning a mutable reference to the contents).
Another change removes the limit on Const evaluation time. Previous releases limited this to prevent user-provided const evaluation from getting into a compile-time infinite loop, but the developers say that "especially creative Rust code could hit these limits and produce a compiler error", so you can now use an unlimited amount of const evaluation at compile time. To avoid having long compilations without feedback, the compiler will always emit a message after your compile-time code has been running for a while.
One point to note is that the developers plan to move to having Windows 10 as the minimum supported Windows version. Rust 1.75 will be the last to officially support Windows 7 and 8, and when Rust 1.76 is released in February 2024, only Windows 10 and later will be supported as tier-1 targets.
Version 1.72 of Rust is available now.
or email your comment to: email@example.com