The Rust Programming Language Blog: Announcing Rust 1.4 |
Choo choo! The trains have kept rolling, and today, we’re happy to announce the release of Rust 1.4, the newest stable release. Rust is a systems programming language focused on safety, speed, and concurrency.
As always, you can install Rust 1.4 from the appropriate page on our website, and check out the detailed release notes for 1.4 on GitHub as well. About 1200 patches were landed in this release.
The story of 1.4 is mostly one of improvements and stabilizations, rather than new features.
However, there is one particular change which is a language fix that enables a new feature: RFC 1214, “Clarify (and improve) rules for projections and well-formedness”. While that’s a deeply technical title, the TL;DR is that we found some weaknesses in the definition and implementation of a few aspects of the type system. This RFC fixes these problems. Given that changes to the type system like this can cause regressions, but fixes like this are important for soundness, Rust 1.4 will warn on any code that violates the new rules, but still compile. These warnings will turn into errors in Rust 1.5. However, given the train model, the community has had time to deal with these changes while 1.4 was in beta, and the small number of crates we were aware of have already been fixed.
These soundness fixes enable the return of the ‘scoped threads’ feature, in which you can create threads that reference data stored on the stack in a safe manner. A few crates have implemented this feature, most notably crossbeam and scoped_threadpool. See their documentation for more information.
RFC 1212
is also in this release, which changes all functions dealing with reading
‘lines’ to treat both \n
and \r\n
as a valid line-ending. This was
determined during the RFC process to be a bugfix, but we’re mentioning it
here to raise awareness. The older behavior of only dealing with \n
made
for surprising behavior, where your crate would work well on Linux and Mac OS
X, but fail on Windows. This fix brings these functions more in-line (
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |