2016-08-16

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.

Updates from Rust Community

News & Blog Posts

Security Advisory for crates.io, 2016-08-15. Please read, especially if you've renamed your GitHub account.

Shape of errors to come. A sneak peek at new & improved error formats in Rust.

What’s new with “The Rust Programming Language”? Second edition of TRPL book is coming up with Carol Nicholas as a co-author.

Zero-cost futures in Rust. futures-rs is now ready for prime time!

Futures in Rust. Writing an Async Web API Wrapper - An excercise in learning Rust.

Rust compiler walk-through: Introduction.

Asynchronous servers in Rust. Using tokio-rs to build an asynchronous server.

Parsing strategies in Rust. Comparing two competing parsing frameworks in Rust: nom, a parser combinator, and LALRPOP, an LR(1) parser generator.

Xero and Sandstorm.io have been added to the Friends of Rust page. Xero is using Rust for infrastructure, and Sandstorm.io has a collections application in Rust.

New Crates & Project Updates

error-chain 0.5.0 released, changing how backtraces are handled.

rust-skeptic 0.6.1 released, with fixes and optimizations.

The official nano-config repo is undeprecated. It now contains a configuration that is compatible with older versions of the editor.

Way Cooler. Customizable Wayland compositor (window manager) written in Rust.

ring. Safe, fast, small crypto using Rust.

ralloc. A fast & memory efficient pure-Rust memory allocator.

Threshold Secret Sharing. A pure-Rust implementation of various threshold secret sharing schemes.

WS-RS. Lightweight, event-driven WebSockets for Rust.

alexa-rs. Rust library for building Alexa skills.

Tantivy. A text search engine library written in Rust.

filters - a crate for building predicates/filters with the builder pattern.

derive_builder. Derive builder implementation for Rust structs.

This week in Servo 74.

This week in Rust docs 17.

TiKV weekly 2016-08-12.

Talking Tock week 1. Tock is a safe, multitasking operating system for low-power, low-memory microcontrollers.

Talking Tock week 2.

What's coming up in imag 13.

Crate of the Week

This week's Crate of the Week is Raph Levien's font-rs, yet another pure Rust font renderer, which is incomplete, but very fast. Thanks StefanoD for the suggestion.

Submit your suggestions for next week!

Call for Participation

Always wanted to contribute to open-source projects but didn't know where to start?
Every week we highlight some tasks from the Rust community for you to pick and get started!

Some of these tasks may also have mentors available, visit the task page for more information.

[moderate] rust-www: Add a section to the front page with 3 rotating 'friends'.
This is an important change to how we present Rust that everybody will see.

[easy] rust: Error code list which need to be updated to new format.

[easy] servo: Do not define Pipeline::setup_common when on Windows.

[easy] rustup: Don't capture backtraces without RUST_BACKTRACE=1.
An easy fix, done in two steps, first modifying error-chain, then upgrading it in rustup.

[easy] rustup: Add command to install shell
completions.

[moderate] rust: improve error message when resolution via Deref
actually required
DerefMut. Good
first type system bug.

[hard] imag: implement bindings to lua/lisp (ketos)/rhai for the filter
library

If you are a Rust project owner and are looking for contributors, please submit tasks here.

Updates from Rust Core

135 pull requests were merged in the last two weeks.

impl trait in return type position Yay! @eddyb, you're a hero!

It is now an error to use private items in public code (formerly a warning)

Also, private_in_public checker now substitutes type aliases

--test-threads=N argument for tests

Slow test warning

Extend MIR to emit LLVM lifetime statements

MIR: new statement kind for enum deaggregation

Incremental Compilation: Fixed some ICEs

Strict Version Hashes for Crates improved

Improved {H,C}ashing for dep-graphs

Some artificial restrictions regarding zero-sized structs/enum variants lifted (RFC 1506)

std::vec::intoIter::as_<mut_>slice()

Optimize std::panic::catch_unwind(_) slightly (don't use it anyway unless you have to)

impl From
for
{ε, Ref, Unsafe}Cell

...

impl FromIterator
for Cow

Macro expansion, expanded

Macros: hygienic metavariables

binary_search_by_key(..) now more flexible with specified lifetime (what a small lifetime annotation can do)

Being smart about concatenating TokenStreams

Unchanged github repos are no longer re-downloaded (uses github API instead)

Test improvements for emscripten port

New errors (+ JSON mode) now active by default Yay! And kudos, Jonathan!

Better error messages on missing parenthesis when calling fields (e.g. (x.y)())

Better {&, *}ptr printing in error messages

Another large batch of changes to error messages

New Contributors

Andrii Dmytrenko

Cameron Hart

Cengiz Can

Chiu-Hsiang Hsu

Christophe Vu-Brugier

Clement Miao

crypto-universe

Felix Rath

hank-der-hafenarbeiter

José manuel Barroso Galindo

Krzysztof Garczynski

Luke Hinds

Marco A L Barbosa

Mark-Simulacrum

Matthew Piziak

Michael Gattozzi

Patrick McCann

Pietro Albini

ShyamSundarB

srdja

Stephen Lazaro

Approved RFCs

Changes to Rust follow the Rust RFC (request for comments)
process. These
are the RFCs that were approved for implementation this week:

RFC 1643: Dedicated strike team to resolve unsafe code guidelines.

RFC 1607: RFC process for formatting style and Rustfmt defaults.

RFC 1683: Create a team responsible for documentation for the Rust project.

RFC 1581: FusedIterator marker trait and iter::Fuse specialization.

RFC 1649: Add extra access methods for atomic types.

RFC 1576: Add a literal fragment specifier for macro_rules! patterns that matches literal constants.

RFC 1506: Clarify the relationships between various kinds of structs and variants.

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:

Allow deriving Deref and DerefMut.

Procedural macros 1.1.

Add "panic-safe" or "total" alternatives to the existing panicking indexing syntax.

Add checked_sub() already known from various primitive types to the Duration struct.

Omit 'static lifetimes to reference or generics lifetime values in static or const declarations.

Add a compiler flag that emits crate dependencies on a best-effort basis.

Specify Rust compatibility of nursery crates.

Define a best practices procedure for making bug fixes in the compiler.

Add parse_generics! and parse_where! macros.

Support code generators with source maps and multiple source directories.

Macro naming and modularisation.

Propose Interior

data-type, to allow moves out of the dropped value during the drop hook.

New RFCs

Use #[link(kind)] to fix imports from native libs on Windows.

Add "meta tags" to Rust documentation conventions and to the rustdoc tool.

Add 'else match' blocks to if expressions.

Upcoming Events

8/17. Boston Rust Meetup: Hack Night.

8/17. Rust Community Team Meeting at #rust-community on irc.mozilla.org.

8/17. Rust Los Angeles Meetup.

8/24. Rust Community Team Meeting at #rust-community on irc.mozilla.org.

8/25. Rust release triage at #rust-triage on irc.mozilla.org.

8/29. Rust Sthlm: Rust on the Web.

8/29. Rust on the web Rust Meetup Stockholm #2.

9/9. Rust Table of Regulars Darmstadt

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

No jobs listed for this week.

Tweet us at @ThisWeekInRust to get your job offers listed here!

Quote of the Week

The best way to learn Rust is to just try! and see what works (or is this to just see what works? now?)!

— llogiq on /r/rust.

Thanks to UtherII for the suggestion.

Submit your quotes for next week!

This Week in Rust is edited by: nasa42, llogiq, and brson.

Show more