Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. This is a weekly summary of its progress and community. Want something mentioned? Tweet us at @ThisWeekInRust or send us an email! Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub. If you find any errors in this week's issue, please submit a PR.
This week's edition was edited by: Brian Anderson, Vikrant Chaudhary, Andrew Gallant, and mdinger.
From the Blogosphere
- Exceptional results: error handling with C# and Rust. Exceptions based error handling in C# vs Rust's monadic approach.
- Rust Torrent. Pietro Menna shares his experiece of writing a BitTorrent client in Rust.
- Exploring Rust. A brief look at state of affairs in Rust 1.0.
- Rust using Visual Studio Code. Setup Visual Studio Code for Rust development.
Tips & Tricks
- How to pass a closure into a trait object.
- Rust error stacktraces. Get stacktrace from errors in production code.
- Benchmarking in Rust with
libtest
.
In the News
- Google Bazel added support for Rust.
- Impala: a Rust dialect that can partially evaluate functions at compile time and produce GPU code.
- Rust: Announcing the community subteam.
New Releases & Project Updates
- RustLex. Lexical analysers generator for Rust.
- rsedis. Redis re-implemented in Rust.
- cargo add. A utility for adding cargo dependencies from the command line.
- volley. A benchmarking tool for measuring the performance of server networking stacks.
- Rust Dispatcher. Dispatcher for Rust, broadcast and subscribe many to many.
- rust-vim-setup. Use VIM as your Rust IDE - set of bash scripts and a customised
vimrc
for Rust development. - Herd. An experimental HTTP load testing application written in Rust.
- MaidSafe's Rust rewrite is going well.
- claxon. A FLAC decoder.
Rust by example has received a number of improvements recently:
- February 15, 2015: The flow control section was created to house all flow control operations together.
- March 21, 2015: The formatting section was
revised so
new users are immediately confronted with the distinction of
Debug
andDisplay
and how to deal with them. - May 2, 2015: The table of contents was reorganized so examples are sorted consistently by categories.
- May 23, 2015: The generics section was majorly expanded.
- June 15, 2015: The closures section was completely rewritten and expanded.
What's cooking on master?
112 pull requests were merged in the last week.
Now you can follow breaking changes as they happen!
Breaking Changes
- Don't panic when stdout doesn't exist. See RFC 1014. This is breaking because it changes the behavior of stdio, but in ways that are expected to be less surprising. Considered a bugfix.
Other Changes
- Thanks to Ashesh Kumar for pointing out that rust-lang.org was not configured with DMARC to prevent spoofing. The misconfiguration has now been corrected.
- Optimize implementations of FromIterator and Extend for Vec.
- Result - Add an
expect
method that prints a message and theErr
value. - Break apart global unstable
features. Some of the
catch-all feature names,
core
,std_misc
,collections
,alloc
, are split into smaller, better-named features. - The regex crate received a rewrite that includes a big performance improvement.
- Avoid deref/ref cycles for no-op conversions between unsafe pointers. Reduces the amount of IR rustc generates.
- Pass fat pointers in two immediate arguments. More codegen improvements from dotdash.
- Add FromRaw{Fd,Handle,Socket} to os preludes.
- Custom Debug impl for io::Error.
New Contributors
- David Stygstra
- Gulshan Singh
- Jake Hickey
- joliv
- Markus
- Steven Walter
- Yongqian Li
Approved RFCs
- Update RFC 195 to account for RFC
246. Just accounting
for the
const
/static
distinction in the associated items RFC. - Clarify cast rules, especially regarding fat pointers. Updates RFC 401: coercions.
- RFC 1156: Adjust default object bounds. This is a stable breaking change (the first) to the default lifetime bounds of trait objects.
Final Comment Period
Every week the teams announce a 'final comment period' for RFCs which are close to reaching a conclusion. Express your opinions now. This week's RFCs entering FCP are:
- Allow closure expressions to expand to a
&
or&mut
temporary. - Allow macros in types.
- read_all.
- Add read_into_buf and get_buf to BufRead.
- Rename
connect
tojoin
. - Implement
FromIterator
for the unit type. - Add some of
[T]
's methods to strings and vice-versa.
New RFCs
Upcoming Events
If you are running a Rust event please add it to the calendar to get it mentioned here. Email Erick Tryzelaar or Brian Anderson for access.