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?
121 pull requests were merged in the last week.
Now you can follow breaking changes as they happen!
Breaking Changes
- The prelude exports fewer traits per RFC
503. This mostly affects code that implements basic
traits like operators and iterators, which will now need to import
those traits directly, but also removes the deprecated
from_str
function, which should be replaced by theparse
method. - 'Object-safe' traits can not include static methods.
- Trait objects now implement their trait by default.
- Fixed-length array syntax is now
[T; n]
and the old syntax no longer works. RFC. - Importing the containing module at the same time as items it
contains is now done with
self
instead ofmod
, as inuse foo::{self, bar}
, and thederiving
attribute is changing toderive
. The old deprecated syntaxes continued to work for about a day but were quickly terminated. RFC and RFC. std::comm
now lives instd::sync::mpsc
, has seen some minor API changes, and is considered stable.RWLock
andMutex
methods now returnLockResult
orTryLockResult
so that they can communicate whether the lock was poisoned.- Arguments to macros are now properly checked for unstable features. This only breaks code that was accidentally subverting feature-gates.
TaskRng
is nowThreadRng
.- The hashmap iterators have been renamed to match conventions.
- The in-tree
term
crate is deprecated. Use Cargo. - There have been some minor breaking changes to
std::string
during another stabilization pass. - There have been some minor breaking changes to
std::sync
during another stabilization pass. - Using the FFI to sneakily link to LLVM intrinsics requires the
link_llvm_intrinsics
feature gate. - Atomic ordering variants are no longer reepxorted.
- A number of
DList
methods are deprecated, along with some minor breaking changes to other collections. - The
BoxAny
trait is removed. UseBox<Any>
.
Other Changes
- Rust again picks a fallback (either
i32
orf64
) for uninferred numeric types. RFC. - Indicating that a type parameter may be unsized is now done
with
T: ?Sized
instead ofSized? T
, and thatSelf
may be unsized withtrait T for ?Sized
instead of `trait T for Sized?. The old syntax still works for the immediate future. RFC. - Nullable enum optimizations have been extended to more types
so that e.g.
Option<Vec<T>>
andOption<String>
take up no more space than the inner types themselves. - Preliminary AArch64 support has landed.
- Rust includes a
rust-gdb
script which launches gdb with Rust-specific pretty-printers enabled.
New Contributors
- A.J. Gardner
- Andrea Canciani
- arturo
- Ben Foppa
- bombless
- crhino
- dan@daramos.com
- Diego Giagio
- Dirk Gadsden
- Earl St Sauver
- Eric Allen
- John Albietz
- JONNALAGADDA Srinivas
- Joseph Rushton Wakeling
- Rohit Joshi
- Tamir Duberstein
- Timon Rapp
- Titouan Vervack
- YawarRaza7349
Approved RFC's
- 526: Statically enforce Unicode in
std::fmt
- 532: Rename the
mod
keyword toself
inside of imports - 534: Rename deriving to derive
New RFC's
Community
From the Team
Blog Posts
- My thoughts on Rust in 2015
- A Rust adventure
- Porting a Ray Tracer to Rust, part 1
- Dependency injection container - Learning the ropes in Rust
- Make your own programming language - Building a programming language in Rust.
Discussions
- PSA: Rust installers now come with Cargo and docs
- Is Intel MPX relevant for Rust?
- Restarting the
int/uint
discussion - Making safety more explicit
- Erlang vs Rust for High concurrency servers
- crates.io dependency graph
- Architectural portability as a first-class artifact of the build system
- Implicit widening, polymorphic indexing, and similar ideas
New Projects
- fern, a runtime-configurable logging library
- Recreating F#'s active patterns with macros
- di, a dependency injection container
- event, a fast, ergonomic thread-local event loop built on mio
- JNI bindings for Rust
- A stopwatch library for Rust. Used to time things
- TaskGraph, a task library in the spirit of C++'s TPL
- clock_ticks - A simple
alternative to
precise_time_ns
that doesn't require the (frequently broken)time
crate.
Project Updates
- This Week in Servo 17
- Cross platform watch script for building cargo projects
- Update on cargo-emscripten
Upcoming Events
- Rust Seatle Meetup, January 12th
- Rust Beijing Meetup, January 17th
- Getting started contributing to Rust, January 17th
- The first Rust-Amsterdam meetup, January 28th. They're looking for speakers