days
1
1
hours
0
7
minutes
3
9
seconds
5
5
Windows gets Rust-y

Rust 1.4 highlights stability and Windows support

Natali Vlatko
Window image via Shutterstock

Have you been waiting for more code ‘soundness’ with Rust? Wait no more. A stable and steady agenda from the Rust core team gives us Rust 1.4, with Cargo and Windows support getting a boost along with type system tweaks. Stability has made its mark.

The announcement of Rust 1.4 as its latest stable release has come with a focus on improvement, as opposed to new features. A whopping 1200 patches make up the release, with a notable language fix ironing out some weaknesses in the type system.

Rust 1.4 stable

Along with numerous bugfixes, the Rust core team have introduced a new feature for the type system that simplifies the outlives relation so its syntactically based. To enable more ‘soundness’ in the code, the team have provided details for improved rules for the outlives relation and projections; more specifically, where WF bounds are enforced, “covering several cases missing from the implementation”.

The above change has been recognised as causing potential regressions, so Rust 1.4 will flag these as warnings if they’re in violation of the new rules. However, the code will still compile. These warnings will turn into errors come Rust 1.5.

With the type system tweak, the ‘scoped threads’ feature has returned, allowing you to safely create threads that reference data stored on the stack. As for the library, 48 APIs were stabilised, 8 were deprecated and a further 2 were made faster.

Windows and Cargo

Rust 1.4 delivers improved Windows support, with the 64-bit MSVC ABI and linker now recommended for use. This recommendation trumps a prior preference for GNU, which came along in Rust 1.2 when Windows support was first introduced.

Rust’s package manager Cargo also fared well in the improvement stakes and now prints extra information about changes via cargo update:

$ 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

Cargo downloads your Rust project’s dependencies and compiles your project, which is distributed by default. If you’ve got rustc installed locally, it’s likely you’ll also have cargo installed locally, too.

The full changelog is available over on GitHub. A list of the 127 contributors who helped out with Rust 1.4 can be found on the official Rust blog.

Author
Natali Vlatko
An Australian who calls Berlin home, via a two year love affair with Singapore. Natali was an Editorial Assistant for JAXenter.com (S&S Media Group).

Comments
comments powered by Disqus