📜 ⬆️ ⬇️

Announcement Rust 1.7

We are pleased to announce the new version of Rust, 1.7. Rust is a system programming language aimed at safe work with memory, speed and parallel code execution.

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

What is included in the stable version 1.7


This release mainly targets libraries. Although we have several language features that we are preparing for future releases, the period in which version 1.7 was developed included holidays, so people spent less time commenting on GitHub and instead paid attention to their close ones.

Library stabilization


Approximately 40 library functions and methods are stabilized in 1.7. One of the largest stabilized APIs is support for custom hashing algorithms in the standard HashMap<K, V> . Previously, all hash dictionaries used SipHash as a hashing algorithm, which provided protection against default DoS attacks. However, SipHash is not very fast when hashing small keys. The FNV algorithm is much faster for such arguments. This means that changing the hashing algorithm for types like HashMap<usize, V> can give a significant performance boost if you
Do not need DoS protection.
')
To see this with an example, you can take the fnv container on crates.io and create a HashMap like this:

 extern crate fnv; use std::collections::HashMap; use std::hash::BuildHasherDefault; use fnv::FnvHasher; type MyHasher = BuildHasherDefault<FnvHasher>; fn main() { let mut map: HashMap<_, _, MyHasher> = HashMap::default(); map.insert(1, "Hello"); map.insert(2, ", world!"); println!("{:?}", map); } 

Note that most of the time you do not even need to specify the type of hashing algorithm, since type inference will work. HashMap::default() is all you need to get hashing that works 2 times faster. It is also worth noting that the Hash type is indifferent to a particular hashing algorithm, so no changes in the types stored in the HashMap are needed!

Other notable improvements include:


See the release notes for details.

Cargo features


Made a few small changes to Cargo:


Participants version 1.7


144 people participated in the development of 1.7. Thank you very much!

List of participants in 1.7
  • Aaron turon
  • Adam perry
  • Adrian heine
  • Aidan hobson sayers
  • Aleksey Kladov
  • Alexander Lopatin
  • Alex Burka
  • Alex Crichton
  • Ali clark
  • Amanieu d'anthras
  • Andrea Bedini
  • Andrea Canciani
  • Andre Bogus
  • Andrew Barchuk
  • Andrew Paseltiner
  • angelsl
  • Anton Blanchard
  • arcnmx
  • Ariel Ben-Yehuda
  • arthurprs
  • ashleysommer
  • Barosl lee
  • Benjamin herr
  • Björn steinbrink
  • bors
  • Brandon w maister
  • Brian anderson
  • Brian campbell
  • Carlos E. Garcia
  • Chad shaffer
  • Corey farwell
  • Daan sprenkels
  • Daniel Campbell
  • Daniel Robertson
  • Dave hodder
  • Dave huseby
  • dileepb
  • Dirk gadsden
  • Eduard burtescu
  • Erick tryzelaar
  • est31
  • Evan
  • Fabrice desré
  • fbergr
  • Felix gruber
  • Felix S. Klock II
  • Florian hahn
  • Geoff catlin
  • Geoffrey thomas
  • Georg Brandl
  • ggomez
  • Gleb kozyrev
  • Gökhan Karabulut
  • Greg Chapple
  • Guillaume bonnet
  • Guillaume gomez
  • Ivan Kozik
  • Jack o'connor
  • Jeffrey seyfried
  • Johan lorenzo
  • Johannes oertel
  • John hodge
  • John Kåre Alsaker
  • Jonas schievink
  • Jonathan reem
  • Jonathan s
  • Jorge aparicio
  • Josh stone
  • Kamal Marhubi
  • Katze
  • Keith yeung
  • Kenneth koski
  • Kevin stock
  • Luke jones
  • Manish goregaokar
  • Marc bowes
  • Marvin lobel
  • Masood Malekghassemi
  • Matt brubeck
  • Mátyás Mustoha
  • Michael Huynh
  • Michael Neumann
  • Michael Woerister
  • mitaa
  • mopp
  • Nathan Kleyn
  • Nicholas Mazzuca
  • Nick cameron
  • Nikita Baksalyar
  • Niko Matsakis
  • NODA, Kai
  • nxnfufunezn
  • Olaf buddenhagen
  • Oliver 'ker' Schneider
  • Oliver middleton
  • Oliver schneider
  • Pascal hertleif
  • Paul dicker
  • Paul Smith
  • Peter Atashian
  • Peter Kolloch
  • petevine
  • Pierre krieger
  • Piotr czarnecki
  • Prayag verma
  • qpid
  • Ravi shankar
  • Reeze xia
  • Richard bradfield
  • Robin kruppe
  • rphmeier
  • Ruud van Asseldonk
  • Ryan Thomas
  • Sandeep datta
  • Scott olson
  • Scott whittaker
  • Sean legler
  • Sean McArthur
  • Sebastian hahn
  • Sebastian wicki
  • Sebastien marie
  • Seo sanghyeon
  • Sergey Veselkov
  • Simonas kazlauskas
  • Simon sapin
  • Stepan koltsov
  • Stephan hugel
  • Steve klabnik
  • Steven allen
  • Steven fackler
  • Tamir duberstein
  • tgor
  • Thomas Wickham
  • Thomas Winwood
  • Tobias bucher
  • Toby scrace
  • Tomasz Miąsko
  • tormol
  • Tshepang Lekhonkhobe
  • Ulrik sverdrup
  • Vadim Petrochenkov
  • Vincent Esche
  • Vlad Ureche
  • Wangshan Lu
  • Wesley wiser

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


All Articles