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,DivRem,BitAnd,BitOr,BitXor,Shl,Shr. This breaks all existing implementations!StringandVecaddition now reuse the LHS buffer. RFC. - The
NegandNotunary ops also take their arguments by value. - A number of changes to the runtime appeared, including
renaming
std::tasktostd::thread, that maps more directly to OS threads. - The in-tree
getopts,log,regex, andregex_macroscrates are deprecated in favor of the ones fromcrates.io. Nearly everything that isn't std is moving to the registry. - Command-line flags to
rustcare being adjusted with an eye towards stabilizing and futureproofing. See PR for details. TreeMap,TreeSet,TrieMap,TrieSet,LruCacheandEnumSethave all been removed from thecollectionscrate, and can for now live in collect-rs. RFC.- The
VecMapiterators are now newtypes instead of type aliases to encapsulate the implementation. - The
BTreeMap,BTreeSet,HashMap, andHashSetiterators are also newtypes.. is_power_of_twono longer incorrectly considers 0 to be a power of 2.regex::Captures::atandCaptures::namereturnOption.- Many, many public reexports of enum variants have been removed.
- The
HashSetiterators have been renamed.
Other Changes
- Backtraces are demangled correctly on Windows.
RingBufnow exposes its buffers via theas_slicesmethod.- A number of collections implement a new method called
drainwhich 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::v1module. - 474: path reform. Tightens up the
PathAPI, and makes some changes around their internal representation. - 504:
Showstabilization. SplitsShowintoShowandString, withShowbeing 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
$cratemeta-variable. - 486:
std::asciireform. Removes theAsciinewtype and implements the old functionality on various forms of arrays ofu8instead. - 509: collections reform part 2. Finalizes the fate of
std::collections, marking some as stable and moving some to the externalcollect-rscrate. - 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
Selfto be used in impls. As it sounds. Reduces verbosity.
New RFC's
- Mark
std::mem::dropas unstable until negative bounds are implemented. - Rename
std::mem::drop. - Rename the
derivingsyntax extension toderive. - Remove certain array elem moves to prepare for non-zeroing drop.
selfinuse.- 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!