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!
- The task local storage (TLS) API was cleaned up (there's still one PR in the queue that finishes it up).
- DList was modernized.
Iterator<char>rather than a
- 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::net_ipand so on were removed. They were redundant names for
Iterator::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
*uintis 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
mutin 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-statsnow 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
println!macros were added (though #7779 renames them).
- Ord now uses default methods,
allowing you to get default implementations for everything but
- x64 now uses large stacks (4 MiB) by default.
is_utf8is now 22% faster
- Metrics reporting and ratcheting was added to the test harness.
- A DoubleEndedIterator was added.
mut_splitmethod 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
mmapwrapper was added.
- SmallIntMap and SmallIntSet have external iterators.
- JSON parsing got 93% faster
- Deque got a good cleanup and speedup.
- vec now implements
peek_adaptor was added, which calls a closure on ever item before returning it. Mostly useful for debugging your iterators.
- vim improvements landed.
po4asupport for translation was added.
libc::c_voidis better documented.
- Man pages for all the tools are now included.
- The iterator tutorial was extended.
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)