Skip to content

Commit a46cc2c

Browse files
committed
1.8 release announcement
1 parent 96e4c2a commit a46cc2c

File tree

1 file changed

+251
-0
lines changed

1 file changed

+251
-0
lines changed

_posts/2016-04-14-Rust-1.8.md

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
---
2+
layout: post
3+
title: "Announcing Rust 1.8"
4+
author: The Rust Core Team
5+
---
6+
7+
The Rust team is happy to announce the latest version of Rust, 1.8. Rust is a
8+
systems programming language focused on safety, speed, and concurrency.
9+
10+
As always, you can [install Rust 1.8][install] from the appropriate page on our
11+
website, and check out the [detailed release notes for 1.8][notes] on GitHub.
12+
About 1400 patches were landed in this release.
13+
14+
[install]: https://www.rust-lang.org/install.html
15+
[notes]: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-180-2016-04-14
16+
17+
### What's in 1.8 stable
18+
19+
There are two new features in Rust 1.8, as well as good news for Windows users!
20+
Additionally, work is underway to replace our `make`-based build system with
21+
one based on Cargo.
22+
23+
The first feature is that the various “operator equals” operators, such as `+=`
24+
and `-=`, are now overloadable via various traits. This change was accepted in
25+
[RFC 953], and looks like this:
26+
27+
```rust
28+
use std::ops:: AddAssign;
29+
30+
#[derive(Debug)]
31+
struct Count {
32+
value: i32,
33+
}
34+
35+
impl AddAssign for Count {
36+
fn add_assign(&mut self, other: Count) {
37+
self.value += other.value;
38+
}
39+
}
40+
41+
fn main() {
42+
let mut c1 = Count { value: 1 };
43+
let c2 = Count { value: 5 };
44+
45+
c1 += c2;
46+
47+
println!("{:?}", c1);
48+
}
49+
```
50+
51+
[RFC 953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md
52+
53+
This will print out `Count { value: 6 }`. Like the other operator traits, an
54+
associated type allows you to use different types on each side of the operator,
55+
as well. See the RFC for more details.
56+
57+
The second feature is very small, and comes from [RFC 218]. Before Rust 1.8, a
58+
`struct` with no fields did not have curly braces:
59+
60+
```rust
61+
struct Foo; // works
62+
struct Bar { }; // error
63+
```
64+
65+
[RFC 218]: https://github.com/rust-lang/rfcs/blob/master/text/0218-empty-struct-with-braces.md
66+
67+
The second form is no longer an error, and is equivalent to the first. This was
68+
originally disallowed for consistency with other empty declarations, as well as
69+
a parsing ambiguity. However, that ambiguity is non-existent in post-1.0 Rust,
70+
and macro authors saw additional complexity due to needing a special-case. Also,
71+
users who do active development would sometimes switch between empty and
72+
non-empty versions of a struct, and the extra work and diffs involved was less
73+
than ideal. Allowing both forms is slightly less consistent, but the ergonomics
74+
of these two cases was deemed worth it.
75+
76+
On the Windows front, 32-bit MSVC builds [now implement unwinding]. This moves
77+
`i686-pc-windows-msvc` to a Tier 1 platform.
78+
79+
[now implement unwinding]: https://github.com/rust-lang/rust/pull/30448
80+
81+
Finally, we have used `make` to build Rust for a very long time. However,
82+
we already have a wonderful tool for building Rust programs: Cargo. In Rust
83+
1.8, [initial support landed] for a new build system that’s written in Rust,
84+
and based on Cargo. It is not yet the default, and there is much more work to
85+
do. We will talk about this in release notes more once it’s completely done,
86+
for now, please read the GitHub issue for more details.
87+
88+
[initial support landed]: https://github.com/rust-lang/rust/pull/30448
89+
90+
#### Library stabilizations
91+
92+
About 20 library functions and methods are now stable in 1.8. There are three
93+
major groups of changes: UTF-16 related string methods, various APIs related to
94+
time, and the various traits needed for operator overloading mentioned in the
95+
language section.
96+
97+
Other notable improvements include:
98+
99+
* `<[T]>::clone_from_slice()`, an efficient way to copy the data from one slice
100+
and put it into another slice.
101+
* Various convenience methods on `Ipv4Addr` and `Ipv6Addr`, such as `is_loopback()`,
102+
which returns `true` or `false` if the address is a loopback address according to
103+
RFC 6890.
104+
* Various improvements to `CString`, used for FFI.
105+
* checked, saturated, and overflowing operations for various numeric types.
106+
These aren’t counted in that ‘40’ number above, because there are a _lot_ of
107+
them, but they all do the same thing.
108+
109+
See the [detailed release notes][notes] for more.
110+
111+
#### Cargo features
112+
113+
There were a few small updates to Cargo:
114+
115+
* [`cargo init`](https://github.com/rust-lang/cargo/pull/2081) can be used to
116+
start a Cargo project in your current working directory, rather than making a
117+
new subdirectory like `cargo new`.
118+
* `Cargo.toml` now has [keys for `-v` and `--color`](https://github.com/rust-lang/cargo/pull/2397)
119+
120+
See the release notes for the full list of changes.
121+
122+
### Contributors to 1.7
123+
124+
We had 126 individuals contribute to 1.7. Thank you so much!
125+
126+
* Aaron Turon
127+
* Abhishek Chanda
128+
* Adolfo Ochagavía
129+
* Aidan Hobson Sayers
130+
* Alan Somers
131+
* Alejandro Wainzinger
132+
* Aleksey Kladov
133+
* Alex Burka
134+
* Alex Crichton
135+
* Amanieu d'Antras
136+
* Andrea Canciani
137+
* Andreas Linz
138+
* Andrew Cantino
139+
* Andrew Horton
140+
* Andrew Paseltiner
141+
* Andrey Cherkashin
142+
* Angus Lees
143+
* arcnmx
144+
* Ariel Ben-Yehuda
145+
* ashleysommer
146+
* Benjamin Herr
147+
* Валерий Лашманов
148+
* Björn Steinbrink
149+
* bors
150+
* Brian Anderson
151+
* Brian Bowman
152+
* Christian Wesselhoeft
153+
* Christopher Serr
154+
* Corey Farwell
155+
* Craig M. Brandenburg
156+
* Cyryl Płotnicki-Chudyk
157+
* Daniel J Rollins
158+
* Dave Huseby
159+
* David AO Lozano
160+
* David Henningsson
161+
* Devon Hollowood
162+
* Dirk Gadsden
163+
* Doug Goldstein
164+
* Eduard Burtescu
165+
* Eduard-Mihai Burtescu
166+
* Eli Friedman
167+
* Emanuel Czirai
168+
* Erick Tryzelaar
169+
* Evan
170+
* Felix S. Klock II
171+
* Florian Berger
172+
* Geoff Catlin
173+
* ggomez
174+
* gohyda
175+
* Gökhan Karabulut
176+
* Guillaume Gomez
177+
* ituxbag
178+
* James Miller
179+
* Jeffrey Seyfried
180+
* John Talling
181+
* Jonas Schievink
182+
* Jonathan S
183+
* Jorge Aparicio
184+
* Joshua Holmer
185+
* JP Sugarbroad
186+
* Kai Noda
187+
* Kamal Marhubi
188+
* Katze
189+
* Kevin Brothaler
190+
* Kevin Butler
191+
* Manish Goregaokar
192+
* Markus Westerlind
193+
* Marvin Löbel
194+
* Masood Malekghassemi
195+
* Matt Brubeck
196+
* Michael Huynh
197+
* Michael Neumann
198+
* Michael Woerister
199+
* mitaa
200+
* Ms2ger
201+
* Nathan Kleyn
202+
* nicholasf
203+
* Nick Cameron
204+
* Niko Matsakis
205+
* Noah
206+
* NODA, Kai
207+
* Novotnik, Petr
208+
* Oliver Middleton
209+
* Oliver Schneider
210+
* petevine
211+
* Philipp Oppermann
212+
* pierzchalski
213+
* Piotr Czarnecki
214+
* pravic
215+
* Pyfisch
216+
* Richo Healey
217+
* Ruud van Asseldonk
218+
* Scott Olson
219+
* Sean McArthur
220+
* Sebastian Wicki
221+
* Sébastien Marie
222+
* Seo Sanghyeon
223+
* Simonas Kazlauskas
224+
* Simon Sapin
225+
* srinivasreddy
226+
* Steve Klabnik
227+
* Steven Allen
228+
* Steven Fackler
229+
* Stu Black
230+
* Tang Chenglong
231+
* Ted Horst
232+
* Ticki
233+
* tiehuis
234+
* Tim Montague
235+
* Tim Neumann
236+
* Timon Van Overveldt
237+
* Tobias Bucher
238+
* Tobias Müller
239+
* Todd Lucas
240+
* Tom Tromey
241+
* Tshepang Lekhonkhobe
242+
* ubsan
243+
* Ulrik Sverdrup
244+
* Vadim Petrochenkov
245+
* vagrant
246+
* Valentin Lorentz
247+
* Varun Vats
248+
* vegai
249+
* vlastachu
250+
* Wangshan Lu
251+
* York Xiang

0 commit comments

Comments
 (0)