We are pleased to introduce the new version of Rust 1.11. Rust is a system programming language aimed at the safe work with memory, speed and parallel code execution.
As usual, you can install Rust 1.11 from the corresponding page of the official site, and also get acquainted with the detailed list of changes in this version on GitHub. This release includes 1109 patches.
In 1.11 we worked a lot on compiler internals, which are not yet stable. We are pleased to announce that MIR will soon become the default translator and we are taking the first steps towards incremental compilation . In release 1.11, we laid the foundation for this work.
With regard to changes visible to users, in the last issue we talked about a new type of container - cdylib .
The existingdylibdynamic librarydylibnow only used for dynamic libraries used in Rust projects, andcdylibwill be used when compiling Rust code for embedding into other languages. In release 1.10,cdylibsupported by the compiler, but not yet supported by Cargo. This format was defined in RFC 1510.
So, in Rust 1.11, Cargo supports cdylib's ! Adding this code to Cargo.toml
crate-type = ["cdylib"] You will receive such a container.
In the standard library, we changed the default hashing function from SipHash 2-4 to SipHash 1-3. We have been thinking about this for a long time, starting from the original decision to use 2-4 :
we offered SipHash-2-4 as a (strong) PRF / MAC, and at the moment no attack was found on it, although many competent people tried to break it. However, a smaller number of rounds may suffice, and I would be very surprised if SipHash-1-3 would be vulnerable when used in hash tables.
More information about changes in the language as a whole can be found in the release notes.
BinaryHeap , BTreeMap , and BTreeSet received the append method. Also added split_off for BTreeMap and BTreeSet::split_off .to_degrees and to_radians have been implemented for f32 and f64 in libstd before, and now they are available in libcore .Iterator two new methods: sum and product .Cell and RefCell get get_mut .assert_eq! accepts custom error message as assert! .See the release notes for details.
See the release notes for details.
In the release of version 1.11, 126 people participated. Thank you very much!
Source: https://habr.com/ru/post/308124/
All Articles