Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions _posts/2016-03-02-Rust-1.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
---
layout: post
title: "Announcing Rust 1.7"
author: The Rust Core Team
---

The Rust team is happy to announce the latest version of Rust, 1.7. Rust is a
systems programming language focused on safety, speed, and concurrency.

As always, you can [install Rust 1.7][install] from the appropriate page on our
website, and check out the [detailed release notes for 1.7][notes] on GitHub.
About 1300 patches were landed in this release.

[install]: http://www.rust-lang.org/install.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: https://

[notes]: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-170-2016-03-03

### What's in 1.7 stable

This release is primarily about library features. While we have several
language features cooking for future releases, the timeframe in which 1.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"in which 1.7 was developed"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

included the holidays, which means less time for commenting on GitHub and more
time for spending with loved ones.

#### New Language features
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just drop this section.


`None`

#### Library stabilizations

About 40 library functions and methods are now stable in 1.7. Notable
improvements include:

* The ability to customize `HashMap<K, V>`s and similar data structures with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can elaborate on this point a bit -- @alexcrichton, maybe you could write up a paragraph or two about how custom hashing works?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In particular, this is a good opportunity to talk about how our hashing design differs from the simple story in e.g. Java, and what the implications are.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure yeah, perhaps something like (wordsmithing always welcome):


One of the largest APIs stabilized during the 1.7 cycle was support for custom hash algorithms in the standard library's HashMap type. Previously all hash maps would use SipHash as the hashing algorithm, which provides protection against DOS attacks by default. SipHash, however, is not very fast at hashing small keys. As shown, however, the FNV hash algorithm is much faster for these size of inputs. This means that by switching hash algorithms for types like HashMap<usize, V> there can be a significant speedup so long as the loss of DOS protection is acceptable.

To see this in action, you can check out the fnv crate on crates.io and create a HashMap via:

extern crate fnv;

use std::collections::HashMap;                            
use std::hash::BuildHasherDefault;                        
use fnv::FnvHasher;                                       

type MyHasher = BuildHasherDefault<FnvHasher>;            

let mut map: HashMap<_, _, MyHasher> = HashMap::default();
map.insert(1, "Hello");                                   
map.insert(2, ", world!");                                
println!("{:?}", map);

Note that most of the time you don't even need to specify the hasher as type inference will take care of it, so HashMap::default() should be all you need to get up to 2x faster hashes. It's also worth pointing out that Hash trait is agnostic to the hashing algorithm used, so no changes are needed to the types being inserted into hash maps to reap the benefits!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍, very nice!

a custom hashing function.
* `<[T]>::clone_from_slice()`, an efficient way to copy the data from one slice
and put it into another slice.
* Various convenience methods on `Ipv4Addr` and `Ipv6Addr`, such as `is_loopback()`,
which returns `true` or `false` if the address is a loopback address according to
RFC 6890.
* Various improvements to `CString`, used for FFI.
* checked, saturated, and overflowing operations for various numeric types.
These aren’t counted in that ‘40’ number above, because there are a _lot_ of
them, but they all do the same thing.

See the [detailed release notes][notes] for more.

### Contributors to 1.7

We had 144 individuals contribute to 1.7. Thank you so much!

* Aaron Turon
* Adam Perry
* Adrian Heine
* Aidan Hobson Sayers
* Aleksey Kladov
* Alexander Lopatin
* Alex Burka
* Alex Crichton
* Ali Clark
* Amanieu d’Antras
* 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 Löbel
* 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 Leffler
* Sean McArthur
* Sebastian Hahn
* Sebastian Wicki
* Sébastien Marie
* Seo Sanghyeon
* Sergey Veselkov
* Simonas Kazlauskas
* Simon Sapin
* Stepan Koltsov
* Stephan Hügel
* Steve Klabnik
* Steven Allen
* Steven Fackler
* Tamir Duberstein
* tgor
* Thomas Wickham
* Thomas Winwood
* Tobias Bucher
* Tomasz Miąsko
* tormol
* Tshepang Lekhonkhobe
* Ulrik Sverdrup
* Vadim Petrochenkov
* Vincent Esche
* Vlad Ureche
* Wangshan Lu
* Wesley Wiser