Hello and welcome to the sixth issue of This Week in Rust, a weekly overview of Rust and its community.
What's cooking on master?
Issue churn this week was -17! A total of 63 PRs were merged this week, twice as many as last week. Not bad!
Breaking changes
- The task local storage (TLS) API was cleaned up (there's still one PR in the queue that finishes it up).
- DList was modernized.
extra::json
now usesIterator<char>
rather than a@Reader
- Various free-standing functions in f32 etc were removed
- ref bindings in irrefutable patterns has been tightened up. This potentially fixes and breaks code. It's breaking because the compiler now rejects incorrect programs that it did not before.
- str no longer encodes invalid utf-8.
extra::rope
was removedextra::net_ip
and so on were removed. They were redundant names forextra::net::ip
and suchIterator::size_hint
's lower bound is no longer an Option
Notable compiler additions, bugfixes, and cleanup
- Unnecessary basic blocks were removed. This makes for much easier to read unoptimized IR.
- Use of
*int
/*uint
is now properly warned in FFI functions. - More default method fixes.
- A needless copy was removed from immediate values (I'm pretty sure LLVM optimized it away when optimizations were on, not positive).
- A lint for overqualified names was added.
- SIMD arithmetic was implemented.
- A graph abstraction and CFG was introduced, to unify how the various pieces of the compiler use graphs.
- The maximum lifetime of stack closures is now constrained. Not quite sure what that means, but it fixes a segfault.
- repr doesn't infinite loop on zero-sized structs (ie, unit structs).
- Type parameter pretty printing
was fixed, it now prints the type name rather than
'a
and'b
and soforth. mut
in default method arguments is now allowed.- IR for calls with immediate return values was improved.
- Exchange allocation headers (ie, the headers on
~T
) were removed. This was a heroic effort by strcat and Luqman. -Z trans-stats
now reports perf-function statistics- Scopes were decoupled from LLVM basic blocks, improving unoptimized builds, and allowing more things in optimized builds to be inlined.
- An infinite loop when recursively including modules was fixed.
- An ICE involving struct-like enum variants was fixed.
- The buildsystem cleans up old libraries when it needs to.
- A bunch of managed boxes were removed from the AST.
Notable library additions, bugfixes, and cleanup
print!
andprintln!
macros were added (though #7779 renames them).- Ord now uses default methods,
allowing you to get default implementations for everything but
lt
. extra::Bitv
now takes&[bool]
rather than~[uint]
.- x64 now uses large stacks (4 MiB) by default.
is_utf8
is now 22% faster- Metrics reporting and ratcheting was added to the test harness.
- A DoubleEndedIterator was added.
- A
mut_split
method was added to partition a&mut [T]
into two pieces. - We now have pointer arithmetic.
- A month's work of runtime work landed.
- A safe, cross-platform
mmap
wrapper was added. - SmallIntMap and SmallIntSet have external iterators.
- JSON parsing got 93% faster
- Deque got a good cleanup and speedup.
- vec now implements
pop_opt
andshift_opt
methods. - A
peek_
adaptor was added, which calls a closure on ever item before returning it. Mostly useful for debugging your iterators.
Documentation etc
- vim improvements landed.
po4a
support for translation was added.libc::c_void
is better documented.- Man pages for all the tools are now included.
- The iterator tutorial was extended.
Meetings
The Tuesday meeting was all about split stacks and FFI. It's complex and above my ability to summarize, but from what I can tell no real consensus was made. But, it's the best enumeration of all the various issues surrounding split stacks that I've seen.
Discussion + Blog posts
From now on I'm going to just link to the reddit thread if there is one, as it often has additional comments or insights.
- A simple, self-contained example of using a shared library
- Experimental Actor Library (reddit)
- Herb Sutter describes Rust (reddit)
- Philosophy and "for" loops (reddit)
- Reddit thread about the weekly meeting
- BZIP2 bindings (reddit)
- Proposal for an additional use case of the "in" keyword besides for loops (reddit)
- Technical Q&A on Servo (reddit)