Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safe, concurrent, and fast. This is a weekly summary of its progress and community. Want something mentioned? Send me an email! Want to get involved? We love contributions.
What's cooking on master?
93 pull requests were merged this week, topping the previous record of 91. Good job everyone, keep up the good work!
Breaking Changes
File
now has astat
method that does not use a path, but rather the open file itself (fstat
). As part of this, thepath
field onFileStat
has been removed.- Some failure in libcore has been
removed.
shift_ptr
andpop_ptr
now return anOption
. TcpStream
sconnect
andbind
constructors now take a string and a port rather than aSocketAddr
structure. There's some controversy around this change, as seen in the PR discussion. The first commit has detailed instructions for porting.num::complex::Cmplx
has been renamed tonum::complex::Complex
.- Process wait timeouts are now implemented. See the PR for details.
- Our unicode support has been cleaned
up, and in the process
str::Normalizations
has been renamed tostr::Decompositions
to reflect what it does. owned
has moved from libcore to libstd, and with itBox
andAnyOwnExt
.- A
read_at_least
method has been added toReader
. Thefill
andpush_exact
methods have been removed. atomics
has moved to libcore.- The
android-cross-path
flat to rustc has been removed. - The Process and
dynamic_library
APIs now use byte slices rather thanPath
s or strings. run_in_bare_thread
has been removed.- The
bitflags!
generatedfrom_bits
constructor is now safe and returns anOption
. from_utf8_owned
now returns a Result.std::fmt
has moved tocore::fmt
.- enum variant names were accidentally leaking into child modules. This is no more.
Other Changes
One PR from last week that apparently slipped through the cracks: we are using jemalloc again!. Additionally, some changes around the new allocator RFC landed.
- String searching now uses a two-way algorithm.
- libterm now supports the win32 console API.
- The
mangle
method onHashMap
has been reintroduced in the form offind_with_or_insert_with
- The shootout-mandelbrot benchmark has seen a 2x performance increase.
- The test runner filter now takes a regex rather than a full path.
- The error reporter for unresolved name hsa been vastly improved to also look for fields and methods on types, and methods on traits, rather than just local variables.
- Blocks are now allowed in constant expressions.
- Windows process spawning and environment variable fetching is now Unicode-aware.
- Fallback functions have been
added for when a given feature
isn't available on Windows XP.
rustc
won't run on XP due to LLVM, but binaries produced by it should.
New Contributors
- Alan Williams
- Cameron Zwarich
- Derek Chiang (Enchi Jiang)
- Hanno Braun
- J.C. Moyer
- Piotr Jawniak
- Zooko Wilcox-O'Hearn
RFCs
- Multiple trait implementations for a single impl block
- Unboxed closures
- Extending safe mutability
- Structs with unspecified layout
Community Updates
The mutpocalypse is nigh. There is almost a full-page of reddit links to self-posts and RFCs in response to Niko's Focusing on Ownership post. The situation is pretty ridiculous. I'm going to pretend it doesn't exist, though. Peruse reddit if you feel up to reading the dozens of suggestions.
- Weekly meeting
- GitHub's Atom editor has Racer support.
- And, a detailed update on Racer.
- I've started my internship at Mozilla (working on Rust, of course), and I've started updating my development log again.
- Seattle meetup interest?
- bindgen now has a macro which can generate bindings at parse-time.
- Rust for C++ programmers: part 6, Rc, Gc, *
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.
In the last two weeks, we landed 79 PRs.
Notable additions
- Josh Matthews implemented a new rooting strategy for JavaScript objects
- Aydin Kim fixed the Android build
- Glenn Watson fixed a bug with the new rooting strategy during page interactions
- Brendan Zabarauskascleaned up the way that we print debug info
- Bryan Bell added dotted border support
- Cameron Zwarich switched JSRef to more efficiently enforce its contravariant lifetime
- Guro Bokum converted many of our RefCells to Cells
- Matt Murphy converted many of our uses of
~[]
toVec
New Contributors
- Brendan Zabarauskas (bjz)
- Bryan Bell (bjwbell)
- Cameron Zwarich (zwarich)
- Glenn Watson (gw)
- Guro Bokum (jiojiajiu)
- Matt Murphy (murphm8)
Meetings and Notes
In the meeting two weeks ago, we introduced a new team member, Cameron Zwarich (zwarich). He is joining us from Apple, and will be working on cross-language inlining in support of SpiderMonkey, among other things. In last week's meeting, we discussed 32-bit support for Servo, the design of the HTML parser, and potentially replacing our Azure+Skia graphics stack.