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?
80 pull requests were merged in the last week.
Now you can follow breaking changes as they happen!
Breaking Changes
- Implementations of
Copy
must now be declared explicitly. This is part of the opt-in-builtin traits RFC (colloquially knows as OIBIT) which is supposed to remove some potential footguns from the typesystem. - Most use of closures have been converted to 'unboxed closures', the new, more flexible, closure model. As a result of API changes some downstream code will break, the PR has detailed instructions for the transition.
- Slight adjustments have been made to the
fmt
API to make them safe. These APIs are rarely used directly. - It's now impossible to explicitly call the
call
method of the closure types without turning on a feature gate. Futureproofing. Doesn't affect the normal calling syntax. - The
Option
andResult
variants are no longer reexported from their respective modules. This won't break most code because the variants are part of the prelude.
Other Changes
- Barosl taught bors how to do rollups!!!!!
- Type bounds can be constrained by the type of an associated
type, as in
fn sum_uints<I>(iter: I) where I: Iterator, I::A = uint { ... }
. RFC. - Lifetime elision works on unboxed closure type sugar.
- The testing guide has been overhauled.
unsafe impl
andunsafe trait
have landed as port of OIBIT. This is required to convertSend
andSync
into library types.BTreeSet
implementsBitOr
,BitAnd
,BitXor
, andSub
.- The
recursion_limit
attribute can control how deeply various algorithms in the compiler recurse. It can be used to convince the typechecker to keep working on particularly complicated types. String
implementsFromIterator<&str>
andExtend<&str>
, which means that iterators of&str
can be collected into or appended on to a single string, e.g.let s: String = vec!["foo", "bar"].into_iter().collect();
,let s = String::new(); s.extend(vec!["foo", "bar"].into_iter());
.- New
os::unix
andos::windows
modules provide platform-specific interop withstd::io
. - The
TupleN
traits are deprecated because tuple indexing is part of the language.
New Contributors
- Aaron Weiss
- Aidan Cully
- Arthur Liao
- bluss
- Jon Haddad
- Matt Murphy
- Matt Windsor
- Maxime Quandalle
- Nafis
Approved RFC's
None.
New RFC's
- 505: API comment conventions. Standardizing current conventions.
- 507: Release channels take 2. Describes the release train, feature staging and in this iteration merges stability attributes with feature gates.
- 509: Collections reform part 2. This RFC shores up the finer details of collections reform. In particular, where the previous RFC focused on general conventions and patterns, this RFC focuses on specific APIs. It also patches up any errors that were found during implementation of part 1. Some of these changes have already been implemented, and simply need to be ratified.
- 517:
io
andos
reform. This RFC proposes a significant redesign of the std::io and std::os modules in preparation for API stabilization. - 519: Panicking tasks should abort process if not handled.
- 520: Change array syntax to prevent ambiguity introduced by RFC 439. An alternative to [RFC 498]rfc498] that fixes the ambiguity by changing the array type syntax.
- 522: Allow the
Self
type to be used in impls. In the implemantion of a trait, instead of writing the explicit type for which a trait is implemented, just writeSelf
.
Community
rustbyexample.com is an official rust-lang project now. Contributions highly encouraged. Reddit.
From the Team
- Rust 1.0: Scheduling the Trains. About the 1.0 release schedule. Reddit. HN.
- Yehuda Katz and Steve Klabnik are joining the Rust Core Team. Reddit. HN.
- Weekly-meetings/2014-18-11: process changes; box patterns; macros; issues in FIXMEs; placement box. Reddit.
Blog Posts
- Fun with Threads: Comparing basic parallel programming in C and Rust, from a beginner's perspective. Reddit
- Rewriting Rust Serialization, Part 3: Introducing Serde: Part 3 of Erick's great series on serialization. Reddit
- Using Rust to Make a Safer Interface for Yahoo’s Fast MDBM Database: Reddit
- Bootstrapping Rust: A quick look at the issues of compiling a compiler written in itself. Reddit
- A Beginner’s Thoughts on Programming Languages (Part 2 — RAII, GC, Ownership, noexcept): Reddit
- Working with AI behavior trees: Using some of the AI features found in Piston. Reddit
24 Days of Rust continues!
- 24 Days of Rust - racer. Reddit.
- 24 Days of Rust - anymap. Reddit.
- 24 Days of Rust - the glorious tau. Reddit.
- 24 Days of Rust - postgres. Reddit.
- 24 Days of Rust - image. Reddit.
- 24 Days of Rust - uuid. Reddit.
- 24 Days of Rust - nalgebra. Reddit.
New Projects
- Elliptic Curve Crypto: Elliptic curve arithmetic and cryptography library in pure Rust
- Rustache: a flexible template engine for Rust
- checked_cast!: A small macro to deal with the libc typedef hell
- Iota: A simple text editor written in Rust
- Metafactory: value construction pipeline builder
- superchan: A Rust crate containing types for sending data across a network
- wxRust: A Rust binding of the wxWidgets cross platform toolkit
Project Updates
- This Week in Servo 14. Servo has adopted hyper. Reddit.
- Servo meeting notes from Mozlandia. Notes from the workweek.
- Servo running on Firefox OS. Reddit.
- rusty-tags now supports emacs
Upcoming Events
- There will be a talk about Rust at PyCon.
- 12/18 Bay Area Rust: Crypto.