Hello and welcome to another issue of This Week in Rust! It's late this week because bors was having some issues which bounced every pull request, and it's no fun writing about nothing.
What's cooking on master?
61 PRs were merged this week.
Breaking Changes
- The first part of the
boxchanges has landed.boxis a keyword, and in an expression is now synonymous with~(ie, it allocates an owned box). std::vec::rawhas seen some cleanup.- Link meta attributes have been
replaced with a
pkgid. rustdoc also now requires apkgidattribute, rather than the deprecated link meta. - Some fairly obscure import syntax has been
changed.
use {foo, bar}is now permitted, and the olduse foo, baris not. Cellhas been removed.RefCellsupersedes it.- Attempting to implement private traits no longer works.
- The coherence
-Zflag has been removed. - The
selflifetime is now illegal, like the rest of the keywords. Now, lifetime parameters are truly only identifiers.
Other changes
- A dead code warning has been
implemented. This is pretty
awesome and will do things like warn for test functions that are accidentally
never marked
#[test]and so are never called. Some bugs in it were also fixed. - The benchmark runner now handles slow benchmarks. Previously, it wouldn't run a benchmark that took more than 1ms. Now, it will!
- The
shootout-fastabenchmark has been rewritten. It's about 10x faster, and looks nicer. - Stepping through / breaking on function calls no longer goes through the function prelude.
- The vector
move_iterhas been made faster. - A single
#[inline]has madevec::from_elem20x faster Buffernow has an iterator over its lines. The gotcha is that the newlines are included in the yielded strings.- Struct pattern shorthand has been
improved by allowing ref/mut,
like
let Foo { mut x, .. } = some_foo, rather than the previouslet Foo { x: mut x, .. } = some_foo. - LTO (link time optimization) has been implemented. Rejoice.
- All landing pads (and thus unwinding!) can now be omitted when doing LTO.
std::io::utilhas been added with:LimitReaderthat will only readnbytes from another readerNullWriterthat ignores everything written to itNullReaderthat is always EOFZeroReaderwhich returns all zeroes,MultiWriterwhich will replicate a written buffer to many writersChainedReaderwhich reads readers in order to completionTeeReaderwhich will write to a Writer while reading- a
copyfunction which copies the full contents of a reader into a writer.
- Windows application manifests are now embedded, so we don't get special cased.
- A
--dep-infoflag has been added which is like-MMDto C compilers. &mutunderneath&can now be frozen.PortReaderandChanWriterhave been implemented.- Some more random distributions have been implemented.
- We now use LLVM's integrated assembler on Windows.
New contributors
- Cadence Marseille
- Edward Z. Yang
- Erik Price
- Fabrice Desré
- Jan Niklas Hasse
- Richard Diamond
Meeting
The weekly
meeting
discussed enum mod, using types to drive inference (rather than attributes
like #[no_send] etc), a formal grammar, unwinding, and some various PRs (all
mentioned above).
This Week in Servo
Servo is a web browser engine written in Rust and is one of the primary test cases for the Rust language.
We landed 29 PRs this week.
Notable additions
- Patrick Walton landed a number of changes to layout to avoid going back to the DOM for properties to make layout's access to the DOM more opaque. He also cleaned up a significant number of regressions and added a huge number of ref tests.
- Keegan McAllister made content tests work in headless mode in #1382.
- Daniel Glazman added namespace info to elements in #1358.
- Daniel Hedlund added support for leading font metrics on Linux #1352.
Meetings
This week's meeting discussed an upcoming Servo workweek in SF on January 20th. We also discussed the Rust version update and some general team frustration at a large number of regressions lately, primarily caused by the need to disable some of our automated testing due to instability (particularly at shutdown). This week of work saw many of those issues fixed.
Announcements, etc
- FAQ Cheatsheet - A cookbook-style cheatsheet of how to do simple things, based on IRC FAQs.
- Building Rust Code - Current Issues
- Building Rust Code - Using Make
- A Rust port of kissdb
- Reddit
discussion
of the
boxchange.