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.
This Week in Rust is openly developed on Github. If you find any errors or omissions in this week's issue, please submit a PR.
What's cooking on master?
119 pull requests were merged in the last week, and 1 RFC.
Now you can follow breaking changes as they happen!
Breaking Changes
AtomicInt
andAtomicUint
have been renamed toAtomicIsize
andAtomicUsize
to match their corresponding integer types.- To fix a bug in coherence builtin traits can only be implemented for structs and enums.
Other Changes
- Certain long error messages of the form 'expected foo found bar' are now split neatly across multiple lines. Examples in the PR.
- UFCS method calls can now be qualified by the trait of the
method. This can be used to disambiguate method calls when multiple
applicable methods are in scope, e.g.
<i32 as Add<_>>::add(1, 2)
which is equivalent to1.add(2)
. RFC. - Negative impls are partially implemented, though appear
to still be special-cased to the
Send
andSync
traits. RFC. - Mutexes on Windows are faster now they are implemented with Slim Reader Writer Locks.
- The
#[rustc_on_unimplemented]
attribute, requiring the 'on_unimplemented' feature, lets rustc display custom error messages when a trait is expected to be implemented for a type but is not. - Preliminary support for PowerPC.
- Fatal runtime errors are now suitably boring.
New Contributors
- Aidan Hobson Sayers
- Alexander Korolkov
- Andrew Barchuk
- Cam Jackson
- CarVac
- Diggory Blake
- Fenhl
- Greg Chapple
- Jeff Belgum
- Lauri Lehmijoki
- nathan dotz
- Paul Crowley
- Seth Faxon
- Toni Cárdenas
- Travis Watkins
Approved RFC's
- 517: io and os reform (skeleton). Updating the
io
andos
modules is a large task and at the moment the RFC only lays out the motivation. It will be updated incrementally in further pull requests. PR. Many follow-ups have been posted for review: string handling,Reader
/Writer
, deadlines,std::env
,std::process
.
New RFC's
- Use
isz
/usz
as literal suffix forisize
/usize
. - Replace
Vec::drain
by a method that accepts a range parameter. - Rename (maybe one of) the standard collections for consistency. Proposes several possible renamings.
- Add
foreach
to iterators. An internal iterator. - Add
fmt
size hints. Allows buffers to be optimized. - Remove
proc
keyword. Why isn't it gone already? - Negative bounds. Gives flexibility to avoid coherence conflicts.
- Make return types of
Fn
traits associated types. More flexible because it doesn't require generic return types to be constrained. - Early trait bounds on generic types. Create a convention to always apply trait bounds to wrapper types to improve error messages when the bounds on the underlying types or methods can't be satisfied.
- sizeof, alignof, offsetof, typeof.
- CStr, the dereferenced complement to CString.
- Forbid identifier
Self
for definitions. Fixing a weird corner case that results fromSelf
not being a keyword. - Support incremental compilation. Rearchitect the compiler.
- Output option handling. Make rustc's
-o
,--out-dir
, and--emit
options more consistent.
Community
The periodic table of Rust types has been updated, and /r/rust finally hit 8 trillion subscribers.
From the Team
- Weekly-meetings/2015-01-13. fott; homu; integer overflow; I/O; 1.0; comment RFC
Blog Posts
- Thoughts about Rust from a D programmer. Good comparison. /r/rust. /r/programming.
- Recent syntactic changes. Nick discusses some of the last-minute syntax changes he's recently landed.
- Little Orphan Impls. Niko discusses options for coherence rules. /r/rust.
- Unboxed Closures and FFI Callbacks. How to use closures as foreign callbacks.
- A Quick Comparison of Nim vs. Rust. HN. /r/rust. /r/programming.
- Mooney GB: A Gameboy emulator written in Rust.
- Building a HashMap in Rust - Part 1: What's a Hashmap?. Gankro on the Rust HashMap. /r/rust.
- Worklog 2015-01-17: Rustdoc testing. Yurume on his new patch to test rustdoc output.
- Solving Project Eueler with Rust. A walk through of the first problem.
- Getting started contributing to Rust. kmc's slides from the Saturday event in SF.
- Explore ownership in Rust. Good entry level discussion of ownership. /r/rust.
- DTrace on Rust.
- SystemTap on Rust. Not to be outdone.
- Summary of Korean Rust Meetup #4. The Korean Rust contingent is always up to interesting stuff.
Videos
- Servo: Building a Parallel Web Browser. Jack Moffit at linux.conf.au. HN. /r/programming.
Discussions
- Small string optimization, remove as_mut_vec. The current
definition of
Vec
doesn't allow the common 'small string' optimization. /r/rust. - Does Rust let you develop faster than C++?. TL;DR ¯\_(ツ)_/¯
- Using Rust 1.0 for video game development. Yes, please.
- Rust support in Visual Studio. Doesn't exist yet, sorry.
- Rust Berlin community efforts. Berlin needs you!
- By value operator overloading problems. Implementing math
operators for non-copyable types means you have to pass them by
reference, like
&a + &b
, which some consider unsightly.
New Projects
- launch-code. Cryptographic auditing of unsafe code. /r/rust.
- rust-cipher. Encryption with XSalsa20 and BLAKE2B-512 in the Encrypt-then-MAC mode.
- rust-haskell-ffi. Example of calling Rust from Haskell.
- dynamodule. Experiments with dynamic OOP.
- rdb-rs. A Redis RDB parser.
- carboxyl. Functional reactive programming.
- Sparkle. An entity component system. /r/rust.
- rust-erl-ext. Erlang 'external term' parser.
- rs-intrusive. A system for creating intrusive data structures, Rust's kryptonite.
- handlebars-iron. Template middleware for the Iron web framework.
- hematite_server. Minecraft server clone.
Project Updates
- This Week in Servo 19.
- Worklog 2015-01-13: Time zones, chrono, and associated types. Yurume discusses updates to rust-chrono.
Upcoming Events
- January 19 - Rust Paris
- January 20 - Rust Berlin
- January 20 - Fast, Safe, and Beautiful. Jim Blandy's webcast on Rust for O'Reilly.
- January 28 - Rust Amsterdam