|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Announcing Rust 1.2" |
| 4 | +author: The Rust Core Team |
| 5 | +--- |
| 6 | + |
| 7 | +Today marks the [completion][install] of the Rust 1.2 stable and 1.3 beta |
| 8 | +release cycles! Read on for the highlight, or check the [release notes][notes] |
| 9 | +for more detail. |
| 10 | + |
| 11 | +[install]: http://www.rust-lang.org/install.html |
| 12 | +[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-120-august-2015 |
| 13 | + |
| 14 | +### What's in 1.2 stable |
| 15 | + |
| 16 | +As we |
| 17 | +[previously announced](http://blog.rust-lang.org/2015/06/25/Rust-1.1.html), Rust |
| 18 | +1.2 comes with two major performance improvements for the compiler: |
| 19 | + |
| 20 | +- **An across-the-board improvement** to real-world compiler |
| 21 | + performance. Representative crates include [hyper][hyper] (compiles 1.16x |
| 22 | + faster), [html5ever][html5ever] (1.62x faster), [regex][regex] (1.32x faster) |
| 23 | + and [rust-encoding][rust-encoding] (1.35x faster). You can explore some of this |
| 24 | + performance data at Nick Cameron's |
| 25 | + [preliminary tracking site](http://www.ncameron.org/perf-rustc/), using dates |
| 26 | + 2015-05-15 to 2015-06-25. |
| 27 | + |
| 28 | +- **Parallel codegen** is |
| 29 | + [now working](https://github.com/rust-lang/rust/pull/26018), and produces a |
| 30 | + 33% speedup when bootstrapping on a 4 core machine. Parallel codegen is |
| 31 | + particularly useful for debug builds, since it prevents some optimizations; |
| 32 | + but it can also be used with optimizations as an effective `-O1` flag. It can |
| 33 | + be activated by passing `-C codegen-units=N` to `rustc`, where `N` is the |
| 34 | + desired number of threads. |
| 35 | + |
| 36 | +Cargo's performance has also improved dramatically: |
| 37 | + |
| 38 | +- Builds that do not require any recompilation ("no-op builds") for large |
| 39 | + projects are much faster: for Servo, build time went from 5 seconds to 0.5 |
| 40 | + seconds. |
| 41 | + |
| 42 | +- Cargo now supports shared target directories that cache dependencies across |
| 43 | + multiple packages, which results in significant build-time reduction for |
| 44 | + complex projects. |
| 45 | + |
| 46 | +The 1.2 release also |
| 47 | +[introduces support](https://github.com/rust-lang/rust/pull/25350) for the MSVC |
| 48 | +(Microsoft Visual C) toolchain, as opposed to GNU variants. The upshot is that |
| 49 | +Rust code is now directly linkable against code built using the native Windows |
| 50 | +toolchain. The compiler bootstraps on MSVC, we have preliminary nightlies, and |
| 51 | +we are testing all rust-lang crates against MSVC. Unwinding support is not yet |
| 52 | +available (the process aborts on panic), but work is underway to land it. |
| 53 | + |
| 54 | +On the language side, Rust 1.2 marks the completion of the |
| 55 | +[dynamically-sized type (DST)](http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/) |
| 56 | +work, allowing smart pointers like `Rc` to seamless apply to arrays and trait |
| 57 | +objects, so that `Rc<[T]>` is fully usable. This final enhancement applies to |
| 58 | +all smart pointers in the standard library. Support for external smart pointer |
| 59 | +types is available in nightlies, and will be stabilized soon. |
| 60 | + |
| 61 | +[hyper]: https://crates.io/crates/hyper |
| 62 | +[html5ever]: https://crates.io/crates/html5ever |
| 63 | +[regex]: https://crates.io/crates/regex |
| 64 | +[rust-encoding]: https://crates.io/crates/encoding |
| 65 | + |
| 66 | +### What's in 1.3 beta |
| 67 | + |
| 68 | +One of the most exciting developments during the 1.3 cycle was the introduction |
| 69 | +of the [Rustonomicon](https://doc.rust-lang.org/nightly/nomicon/), a new book |
| 70 | +covering "The Dark Arts of Advanced and Unsafe Rust Programming". While it's |
| 71 | +still in its early days, this book already provides indispensable coverage of |
| 72 | +some of Rust's more subtle aspects. |
| 73 | + |
| 74 | +The 1.3 cycle also saw additional focus on performance, though most wins here |
| 75 | +are within the standard library: |
| 76 | + |
| 77 | +- The substring matcher now uses a |
| 78 | + [more efficient algorithm](https://github.com/rust-lang/rust/pull/26327). |
| 79 | +- There were |
| 80 | + [improvements to zero filling](https://github.com/rust-lang/rust/pull/26849) |
| 81 | + that speed up `Vec::resize` and `Read::read_to_end`. |
| 82 | +- The implementation of `Read::read_to_end` has been |
| 83 | + [specialized for `stdin` and `File`](https://github.com/rust-lang/rust/pull/26950), |
| 84 | + resulting in additional speedups. |
| 85 | +- The `PartialEq` implementation on slices is now |
| 86 | + [much faster](https://github.com/rust-lang/rust/pull/26884). |
| 87 | + |
| 88 | +We have also made strides in our Windows support, landing |
| 89 | +[preliminary support for targeting Windows XP](https://github.com/rust-lang/rust/pull/26601). While |
| 90 | +we do not intend to treat Windows XP as a "first tier" platform, it is now |
| 91 | +feasible to build Rust code for XP as long as you avoid certain parts of the |
| 92 | +standard library. |
| 93 | + |
| 94 | +On the Cargo front, we have landed support for |
| 95 | +[lint capping](https://github.com/rust-lang/rust/pull/27260) as specified by an |
| 96 | +[earlier RFC](https://github.com/rust-lang/rfcs/pull/1193). The idea is that |
| 97 | +lints in your dependencies should not affect your ability to compile cleanly, |
| 98 | +which in turn makes it easier to tweak the way lints work without undue hassle |
| 99 | +in the ecosystem. |
| 100 | + |
| 101 | +### Contributors to 1.2 |
| 102 | + |
| 103 | +The 1.2 stable release represents the hard work of 180 fine folks: |
| 104 | + |
| 105 | +- Aaron Turon |
| 106 | +- Abhishek Chanda |
| 107 | +- Adolfo Ochagavía |
| 108 | +- Aidan Hobson Sayers |
| 109 | +- Akshay Chiwhane |
| 110 | +- Alex Burka |
| 111 | +- Alex Crichton |
| 112 | +- Alex Stokes |
| 113 | +- Alexander Artemenko |
| 114 | +- Alexis Beingessner |
| 115 | +- Andrea Canciani |
| 116 | +- Andrew Foote |
| 117 | +- Andrew Kensler |
| 118 | +- Andrew Straw |
| 119 | +- Ariel Ben-Yehuda |
| 120 | +- Austin Hellyer |
| 121 | +- Barosl Lee |
| 122 | +- Ben Striegel |
| 123 | +- Björn Steinbrink |
| 124 | +- Brian Anderson |
| 125 | +- Brian Campbell |
| 126 | +- Brian Leibig |
| 127 | +- Brian Quinlan |
| 128 | +- Carol (Nichols || Goulding) |
| 129 | +- Chris Hellmuth |
| 130 | +- Christian Stadelmann |
| 131 | +- Chuck Bassett |
| 132 | +- Corey Farwell |
| 133 | +- Cornel Punga |
| 134 | +- Cruz Julian Bishop |
| 135 | +- Dave Huseby |
| 136 | +- David Campbell |
| 137 | +- David Stygstra |
| 138 | +- David Voit |
| 139 | +- Eduard Bopp |
| 140 | +- Eduard Burtescu |
| 141 | +- Eli Friedman |
| 142 | +- Emilio Cobos Álvarez |
| 143 | +- Emily Dunham |
| 144 | +- Eric Ye |
| 145 | +- Erik Michaels-Ober |
| 146 | +- Falco Hirschenberger |
| 147 | +- Felix S. Klock II |
| 148 | +- FuGangqiang |
| 149 | +- Geoffrey Thomas |
| 150 | +- Gleb Kozyrev |
| 151 | +- Guillaume Gomez |
| 152 | +- Gulshan Singh |
| 153 | +- Heejong Ahn |
| 154 | +- Huachao Huang |
| 155 | +- Huon Wilson |
| 156 | +- Ivan Ukhov |
| 157 | +- Iven Hsu |
| 158 | +- Jake Goulding |
| 159 | +- Jake Hickey |
| 160 | +- James Miller |
| 161 | +- Jared Roesch |
| 162 | +- Jeremy Schlatter |
| 163 | +- Jexell |
| 164 | +- Jim Blandy |
| 165 | +- Johann Tuffe |
| 166 | +- Johannes Hoff |
| 167 | +- Johannes Oertel |
| 168 | +- John Hodge |
| 169 | +- Jonathan Reem |
| 170 | +- Joshua Landau |
| 171 | +- Kevin Ballard |
| 172 | +- Kubilay Kocak |
| 173 | +- Lee Jeffery |
| 174 | +- Leo Correa |
| 175 | +- Liigo Zhuang |
| 176 | +- Lorenz |
| 177 | +- Luca Bruno |
| 178 | +- Luqman Aden |
| 179 | +- Manish Goregaokar |
| 180 | +- Marcel Müller |
| 181 | +- Marcus Klaas |
| 182 | +- Marin Atanasov Nikolov |
| 183 | +- Markus Westerlind |
| 184 | +- Martin Pool |
| 185 | +- Marvin Löbel |
| 186 | +- Matej Lach |
| 187 | +- Mathieu David |
| 188 | +- Matt Brubeck |
| 189 | +- Matthew Astley |
| 190 | +- Max Jacobson |
| 191 | +- Maximilian Haack |
| 192 | +- Michael Layzell |
| 193 | +- Michael Macias |
| 194 | +- Michael Rosenberg |
| 195 | +- Michael Sproul |
| 196 | +- Michael Woerister |
| 197 | +- Mihnea Dobrescu-Balaur |
| 198 | +- Mikhail Zabaluev |
| 199 | +- Mohammed Attia |
| 200 | +- Ms2ger |
| 201 | +- Murarth |
| 202 | +- Mário Feroldi |
| 203 | +- Nathan Long |
| 204 | +- Nathaniel Theis |
| 205 | +- Nick Cameron |
| 206 | +- Nick Desaulniers |
| 207 | +- Nick Fitzgerald |
| 208 | +- Nick Hamann |
| 209 | +- Nick Howell |
| 210 | +- Niko Matsakis |
| 211 | +- Nils Liberg |
| 212 | +- OlegTsyba |
| 213 | +- Oliver 'ker' Schneider |
| 214 | +- Oliver Schneider |
| 215 | +- P1start |
| 216 | +- Parker Moore |
| 217 | +- Pascal Hertleif |
| 218 | +- Paul Faria |
| 219 | +- Paul Oliver |
| 220 | +- Peer Aramillo Irizar |
| 221 | +- Peter Atashian |
| 222 | +- Peter Elmers |
| 223 | +- Philip Munksgaard |
| 224 | +- Ralph Giles |
| 225 | +- Rein Henrichs |
| 226 | +- Ricardo Martins |
| 227 | +- Richo Healey |
| 228 | +- Ricky Taylor |
| 229 | +- Russell Johnston |
| 230 | +- Russell McClellan |
| 231 | +- Ryan Pendleton |
| 232 | +- Ryman |
| 233 | +- Rémi Audebert |
| 234 | +- Sae-bom Kim |
| 235 | +- Sean Collins |
| 236 | +- Sean Gillespie |
| 237 | +- Sean Patrick Santos |
| 238 | +- Seo Sanghyeon |
| 239 | +- Simon Sapin |
| 240 | +- Simonas Kazlauskas |
| 241 | +- Steve Gury |
| 242 | +- Steve Klabnik |
| 243 | +- Steven Allen |
| 244 | +- Steven Fackler |
| 245 | +- Steven Walter |
| 246 | +- Sébastien Marie |
| 247 | +- Tamir Duberstein |
| 248 | +- Thomas Karpiniec |
| 249 | +- Tim Ringenbach |
| 250 | +- Tshepang Lekhonkhobe |
| 251 | +- Ulrik Sverdrup |
| 252 | +- Vadim Petrochenkov |
| 253 | +- Wei-Ming Yang |
| 254 | +- Wesley Wiser |
| 255 | +- Wilfred Hughes |
| 256 | +- Will Andrews |
| 257 | +- Will Engler |
| 258 | +- Xuefeng Wu |
| 259 | +- XuefengWu |
| 260 | +- Yongqian Li |
| 261 | +- York Xiang |
| 262 | +- Z1 |
| 263 | +- ben fleis |
| 264 | +- benaryorg |
| 265 | +- bluss |
| 266 | +- bors |
| 267 | +- clatour |
| 268 | +- diwic |
| 269 | +- dmgawel |
| 270 | +- econoplas |
| 271 | +- frankamp |
| 272 | +- funkill |
| 273 | +- inrustwetrust |
| 274 | +- joliv |
| 275 | +- klutzy |
| 276 | +- marcell |
| 277 | +- mdinger |
| 278 | +- olombard |
| 279 | +- peferron |
| 280 | +- ray glover |
| 281 | +- saml |
| 282 | +- simplex |
| 283 | +- sumito3478 |
| 284 | +- webmobster |
0 commit comments