Hello and welcome to the fourth issue of This Week in Rust, a weekly overview of Rust and its community.
0.7
is being cut soon (today, I think). There are preliminary release notes on
GitHub. The tree has been quite calm, with regards to
breakage. Cycle time is still high, but at least when things land they don't break master.
What's cooking on master?
Issue churn this week was -1. Yay! Issue churn this month was -47. 61 people pushed 1,080 commits, changing 2,117 files and adding a total of 53347 lines. The top 10 committers were pcwalton, brson, dbaupp, strcat, bblum, nmatsakis, acricto, Blei, me (cmr), and aatch.
Much of the work this week was cleanup or rebases of older PRs that just hadn't made it in yet.
Notable additions, bugfixes, and cleanup
- Eridius has finished (I think!) the last bit of UNIX terminal support, adding fallback and smarter detection. It should work in 8-color terminals now too.
- pcwalton rewrote each_path, with the goal of future performance enhancements.
- tjc has done a bunch of rustpkg work.
- aatch did some trans cleanup.
- gifnksm added
max_by
andmin_by
methods toIteratorUtil
for getting the largest/smallest value in an iterator given a score function. - brson got a fix that releases large stacks after they are used to lower memory usage.
- mw has a bunch of debuginfo work, as well as docs and cleanup.
- Blei did an intrinsic overhaul.
- acrichto implemented
static mut
, for globals. Using them requires unsafe code. - DaGenix cleaned up and extended the SHA code.
- acrichto renamed
.rc
files to.rs
..rc
is deprecated and functionally equivalent to.rs
, all new code should use it. He also added awarnings
lint attribute for enabling/disabling warnings in bulk. - indutny added
mman
(includingmmap
) FFI. - dbaupp found a curious performance win by changing some ordering around,
while also enabling conditionally defined macros and macro expansion to items with
#[cfg]
attributes. - Luqman fixed by-value self.
- acrichto expanded the
deriving(ToStr)
code to useToStr
on fields rather than usingfmt!("%?", x)
. - Blei fixed a lot of problems with owned trait objects (
~Trait
). - sully has landed some default method fixes
Breaking Changes
- As usual, a bunch of iterator work.
- pcwalton renamed Owned to Send and Const to Freeze, better reflecting their actual semantics.
- He also disallowed
mut
from distributing over bindings. For example, the following code no longer works:let mut (a, b) = (c, d)
. - dbaupp converted many vector functions to methods. He has a second part in line.
- Luqman renamed the
finalize
method in theDrop
trait todrop
.
Other changes
bblum did some trait/fn/closure bounds here and here, but I don't really understand what they do or their significance. He said:
{% blockquote %} it changes the way traits/closures and captured data fulfill kind bounds, so you can restrict or loosen the requirements instead of having the fixed defaults of "can only capture Send things in ~fn/~Trait"
one example is that you can add the extra requirement of Freeze, so you can put existential data inside of ARCs
see https://github.com/mozilla/rust/blob/master/src/test/run-pass/trait-bounds-in-arc.rs
http://smallcultfollowing.com/babysteps/blog/2013/06/11/data-parallelism-in-rust/ is another, more complicated but less contrived, example for how they would be useful
Meetings
The Tuesday meeting
mainly discussed @mut
and iterators, as well as some minor 0.7 releng stuff.
I suggest reading the @mut
discussion yourself, but essentially it revolves
around it not quite fitting into the language, and that it could be easily
punted to a library. The iterator discussion was not notable.
Discussion + Blog posts
- New container/iterator tutorial
- "Language support for external iterators"
- "Rust gets a lot of things right"
- "Planning a project in rust?"
- "Memory layout of types"
- mw's second status report
External projects
- QuickCheck for Rust.
- RustGnuplot (GitHub)