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?
149 pull requests were merged in the last week.
Now you can follow breaking changes as they happen!
Breaking Changes
- Macros using parens and square brackets (
macro!()
,macro![]
) are parsed as expressions if not followed by a semicolon. This makes expressions likevec![1i, 2, 3].len();
work as expected. RFC. - Binops take their arguments by value, including
Add
,Sub
,Mul
,Div
Rem
,BitAnd
,BitOr
,BitXor
,Shl
,Shr
. This breaks all existing implementations!String
andVec
addition now reuse the LHS buffer. RFC. - The
Neg
andNot
unary ops also take their arguments by value. - A number of changes to the runtime appeared, including
renaming
std::task
tostd::thread
, that maps more directly to OS threads. - The in-tree
getopts
,log
,regex
, andregex_macros
crates are deprecated in favor of the ones fromcrates.io
. Nearly everything that isn't std is moving to the registry. - Command-line flags to
rustc
are being adjusted with an eye towards stabilizing and futureproofing. See PR for details. TreeMap
,TreeSet
,TrieMap
,TrieSet
,LruCache
andEnumSet
have all been removed from thecollections
crate, and can for now live in collect-rs. RFC.- The
VecMap
iterators are now newtypes instead of type aliases to encapsulate the implementation. - The
BTreeMap
,BTreeSet
,HashMap
, andHashSet
iterators are also newtypes.. is_power_of_two
no longer incorrectly considers 0 to be a power of 2.regex::Captures::at
andCaptures::name
returnOption
.- Many, many public reexports of enum variants have been removed.
- The
HashSet
iterators have been renamed.
Other Changes
- Backtraces are demangled correctly on Windows.
RingBuf
now exposes its buffers via theas_slices
method.- A number of collections implement a new method called
drain
which removes all members of the collection without deallocating the underlying buffers. - Work is progressing on generalized where clauses which is necessary for associated types to be fully useful. RFC.
New Contributors
- Aaron Friel
- Akos Kiss
- Andrew Wagner
- Eric Kidd
- Jacob Edelman
- Jake Goulding
- Jared Roesch
- Ken Tossell
- Kevin Yap
- Martin Pool
- Mathieu Poumeyrol
- Mike Pedersen
- Niels Egberts
- Pedro Larroy
- Sean Collins
- Seth Pollack
- mchaput
Approved RFC's
- 503: prelude stabilization. Removes a ton of stuff from the prelude,
and moves what remains to a
std::prelude::v1
module. - 474: path reform. Tightens up the
Path
API, and makes some changes around their internal representation. - 504:
Show
stabilization. SplitsShow
intoShow
andString
, withShow
being tied to the re-introduced{:?}
format string specifier for debugging purposes. - 453: macro reform. Tightens up how macro import/export "works", and
solves the "curious inner module" problem with a
$crate
meta-variable. - 486:
std::ascii
reform. Removes theAscii
newtype and implements the old functionality on various forms of arrays ofu8
instead. - 509: collections reform part 2. Finalizes the fate of
std::collections
, marking some as stable and moving some to the externalcollect-rs
crate. - 520: new array repeat syntax. Due to an ambiguity with range
notation, the fixed-length array syntax has changed to
[T; N]
for the type and[expr; N]
for the constructor. - 522: Allow
Self
to be used in impls. As it sounds. Reduces verbosity.
New RFC's
- Mark
std::mem::drop
as unstable until negative bounds are implemented. - Rename
std::mem::drop
. - Rename the
deriving
syntax extension toderive
. - Remove certain array elem moves to prepare for non-zeroing drop.
self
inuse
.- Amend RFC process with a defined scope.
- Generic conversion traits.
- Generic string pattern matching API.
- Statically enforce Unicode in
std::fmt
.
Community
The video from the Thursday's SF Meetup about crypto has several interesting presentations.
From the Team
Blog Posts
- Diving into concurrency: trying out mutexes and atomics (in Rust and C). Reddit.
- Comparing Rust and C++. Reddit. Note that this appears to be a translation of an older post in Russian.
- Updating Github Pages with Travis CI. Reddit
- This Week in Servo 15. Reddit.
- Columnarization in Rust. Reddit.
- Introducing Hyper. Reddit.
- Rewriting Rust Serialization, Part 3.1: Another Performance Digression. Reddit.
24 Days of Rust continues!
- nalgebra. Reddit
- FUSE filesystems, part 1. Reddit.
- FUSE filesystems, part 2.
from_fn
. Reddit.- redis. Reddit.
- zeromq. Reddit.
- rusti
- rust-crypto. Reddit.
Discussions
- Anyone working on C/C++ to Rust transpilers?
- Rust ruined C++ for me
- Well written rust code to read and learn from?
New Projects
- rusql, "A naive, SQL based RDBMS written in Rust."
- Rusthon, "a python-like language that converts and compiles into: Rust, C++, and JavaScript."
- rbencode, a Bencode implementation.
- wtftw, "Window Tiling For The Win. A tiling window manager written in Rust."
- Custom Logger with time-stamp, file name and line number.
- cpal, pure Rust audio renderer.
- rusti reborn, a REPL for Rust
- nadeko, "an experimental syntax extension which converts functions into amd64 assembly code."
- traverse, "proof-of-concept trait for internal iterators called traversals."
Upcoming Events
Nothing on the calendar for the next two weeks!