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: nasa42, brson, and llogiq.
Updates from Rust Community
News & Blog Posts
- Guide: Contributing to the Rust compiler.
- A type-safe and zero-allocation library for reading and navigating ELF files.
- [podcast] New Rustacean podcast episode 09. Getting into the nitty-gritty with Rust's traits.
- ArcadeRS 1.12: Brawl, at last! Part of the series ArcadeRS 1.0: The project - a series whose objective is to explore the Rust programming language and ecosystem through the development of a simple, old-school shooter.
- Raspberry Pi bare metal programming with Rust.
- This week in Servo 47.
- This week in Redox OS 10.
Notable New Crates & Project Updates
- Amethyst. Data-oriented game engine written in Rust.
- Rust website has received some major updates.
- Rust and Cargo are now available in Debian stretch.
- Rust on Particle: Call for contributors.
- capnp-rpc-rust rewritten to use async I/O.
- Palette. A Rust library for linear color calculations and conversion.
Updates from Rust Core
164 pull requests were merged in the last week.
See the triage digest and subteam reports for more details.
Notable changes
- std: Stabilize APIs for the 1.7 release.
- Refactor and improve: Arena, TypedArena.
- Let
str::replace
take a pattern. - rustc_resolve: Fix bug in duplicate checking for extern crates.
- Rewrite BTreeMap to use parent pointers.
- Support generic associated consts.
- Add an
impl
forBox<Error>
from String. - Introduce "obligation forest" data structure into fulfillment to track backtraces.
- Remove negate_unsigned feature gate.
- llvm: Add support for vectorcall (X86_VectorCall) convention.
- Make coherence more tolerant of error types.
- Add fast path for ASCII in UTF-8 validation.
- Downgrade unit struct match via S(..) warnings to errors.
- Move const block checks before lowering step.
New Contributors
- Anton Blanchard
- Jonas Tepe
- Jörg Krause
- Joshua Olson
- kalita.alexey
- Pierre Krieger
- Sergey Veselkov
- Simon Martin
- Steffen
- tomaka
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
Final Comment Period
Every week the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now. This week's FCPs are:
- Add
[
to the FOLLOW(ty) in macro future-proofing rules. - Rewrite
for
loop desugaring to use language items. - Amend 1192 (RangeInclusive) to use an enum.
- Trait-based exception handling.
- Improve Cargo target-specific dependencies.
- Add a
IndexAssign
trait that allows overloading "indexed assignment" expressions likea[b] = c
. - Allow eliding more type parameters.
- Add an
alias
attribute to#[link]
and-l
.
New RFCs
- Add a used attribute to prevent symbols from being discarded.
- Move some net2 functionality into libstd.
- Add
some!
macro for unwrapping Option more safely. - Stabilize the
volatile_load
andvolatile_store
intrinsics asptr::volatile_read
andptr::volatile_write
.
Upcoming Events
- 1/19. Rust Hack and Learn Hamburg @ Ponton.
- 1/21. SF Bay Area: Rust Concurrency and Parallelism.
- 1/27. OpenTechSchool Berlin: Rust Hack and Learn.
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.
fn work(on: RustProject) -> Money
- Rust Engineer at MaidSafe.
- Research Engineer - Servo at Mozilla.
- Senior Research Engineer - Rust at Mozilla.
- PhD and postdoc positions at MPI-SWS.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Crate of the Week
This week's Crate of the Week is toml, a crate for all our configuration needs, simple yet effective.
Thanks to Steven Allen for the suggestion.
Submit your suggestions for next week!
Quote of the Week
Borrow/lifetime errors are usually Rust compiler bugs. Typically, I will spend 20 minutes detailing the precise conditions of the bug, using language that understates my immense knowledge, while demonstrating sympathetic understanding of the pressures placed on a Rust compiler developer, who is also probably studying for several exams at the moment. The developer reading my bug report may not understand this stuff as well as I do, so I will carefully trace the lifetimes of each variable, where memory is allocated on the stack vs the heap, which struct or function owns a value at any point in time, where borrows begin and where they... oh yeah, actually that variable really doesn't live long enough.
Thanks to Wa Delma for the suggestion.