


















The Rust team is happy to announce the latest version of Rust, 1.11. Rust is a systems programming language focused on safety, speed, and concurrency.
As always, you can install Rust 1.11 from the appropriate page on our website, and check out the detailed release notes for 1.11 on GitHub. 1109 patches were landed in this release.
Much of the work that went into 1.11 was with regards to compiler internals that are not yet stable. We're excited about features like MIR becoming the default and the beginnings of incremental compilation, and the 1.11 release has laid the groundwork.
As for user-facing changes, last release, we talked about the new cdylib
crate type.
The existing dylib dynamic library format will now be used solely for writing a dynamic library to be used within a Rust project, while cdylibs will be used when compiling Rust code as a dynamic library to be embedded in another language. With the 1.10 release, cdylibs are supported by the compiler, but not yet in Cargo. This format was defined in RFC 1510.
Well, in Rust 1.11, support for cdylibs has landed in
Cargo! By adding this to your
Cargo.toml:
crate-type = ["cdylib"]
You'll get one built.
In the standard library, the default hashing function was
changed, from SipHash 2-4
to SipHash 1-3. We have been thinking about this for a long time, as far
back as the original decision to go with 2-4:
we proposed SipHash-2-4 as a (strong) PRF/MAC, and so far no attack whatsoever has been found, although many competent people tried to break it. However, fewer rounds may be sufficient and I would be very surprised if SipHash-1-3 introduced weaknesses for hash tables.
See the detailed release notes for more.
append method was added to
BinaryHeap,
BTreeMap,
and
BTreeSet.
In addition, split_off was added to BTreeMap and BTreeSet::split_off.to_degrees and to_radians methods were on the f32 and f64
types in libstd, but they are now in libcore as well.Iterator has two new methods:
sum and
productCell and RefCell gained get_mut.assert_eq! accepts a custom error message, like assert! does.See the detailed release notes for more.
See the detailed release notes for more.
We had 126 individuals contribute to 1.11. Thank you so much!
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。