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.

What's in 1.4 stable

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

and \r

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

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 (😉) with expectations.

Rust 1.4 marks an upgrade in our Windows support: Windows builds targeting the 64-bit MSVC ABI and linker (instead of GNU) are now supported and recommended for general use, and will appear on the downloads page for the first time. Thank you to all who have helped us work out the kinks since support initially landed in Rust 1.2.

Here’s a summary of library changes:

48 APIs were stabilized.

Eight APIs were deprecated.

Two were made faster.

Over ten various types implement new traits.

See the release notes for exact details.

The compiler no longer uses morestack , which was a holdover implementation detail from long, long ago. We now use guard pages and stack probes instead, though stack probes are only implemented on Windows so far.

Finally, one major Cargo improvement: cargo update will now print extra information about what it is changing. For example:

cargo update Updating registry `https://github.com/rust-lang/crates.io-index` Updating libc v0.1.8 -> v0.1.10 Updating memchr v0.1.3 -> v0.1.5 Updating num v0.1.26 -> v0.1.27 Updating rand v0.3.9 -> v0.3.10 Updating rustc-serialize v0.3.15 -> v0.3.16

Before, it would do this job silently.

Contributors to 1.4

Rust is a community-driven project, and we're very appreciative of the work of the 127 contributors who made 1.4 happen. Thank you!