📜 ⬆️ ⬇️

Rust 1.6 Preview

Hello in 2016! We are pleased to announce the first release of Rust - 1.6 this year. Rust is a system programming language aimed at safe work with memory, speed and parallel code execution.

As always, you can install Rust 1.6 from the corresponding page of our site, as well as see a detailed list of changes for version 1.6 on Github. This release included 1100 patches.

What is included in the stable version 1.6


This release includes a number of minor improvements, one big innovation and a change on Crates.io .

Libcore stabilization


The biggest innovation in 1.6 is the stabilization of the libcore library. The standard Rust library consists of two layers: the small base library libcore and the full standard library libstd , which is built on the basis of libcore . libcore itself libcore completely platform-independent and requires several external functions to be defined. The full libstd library libstd based on libcore and adds support for memory allocation, I / O operations and multithreading. When using Rust in embedded environments and when writing operating systems, libstd often abandoned and uses only libcore .
')
libcore stabilization is an important step towards the ability to write the libcore level code on a stable version of Rust. However, the work is not finished yet. Stabilization will allow the library ecosystem to grow around libcore , but its use in applications is not yet fully supported. Expect news from this area in future releases.

Library stabilization


About 30 library functions and methods are stabilized in 1.6. The most notable improvements include:

The drain() family of functions for collections. These methods allow you to move items from collections, while preserving the memory in which they are located, thereby in some cases reducing the need for memory allocation.

Several implementations of the type From for converting between types from the standard library, mainly between integer numbers and floating point numbers.

Finally, the Vec::extend_from_slice() method, previously known as push_all() . It is much faster than the more general extend() method.

You can also look at the detailed list of changes .

It is prohibited to use asterisks instead of dependency versions on Crates.io


If you support the container on Crates.io , then you may have already noticed a warning: the new containers can no longer use the pattern * as the version number in dependencies. In other words, you can't do this anymore:

 [dependencies] regex = "*" 

Instead, you must specify a specific version or range of versions using one of the many restrictions on the version from the semver container: ^ , ~ or = .

An asterisk means that you can work with any version of this dependency. Most likely this is not true, and only adds unnecessary compatibility issues in the ecosystem. The warning about prohibiting an asterisk as a version has been displayed for quite some time when the container was published on Crates.io , and now it will become a real mistake.

From translator


I want to thank defuz , Revertis , D101101 and the whole Russian-speaking community Rust for their help in translating.

Source: https://habr.com/ru/post/275593/


All Articles