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.
From the Blogosphere
- Announcing Rust 1.2.
- Writing Unsafe and Low-Level Code in Rust.
- Creating a PHP Extension to Rust.
- Objective-C from Rust: objc_msgSend.
- A Simple Web App in Rust, Part 4 -- CLI Option Parsing.
- [video] The Rust Programming Language from Google TechTalks.
New Releases & Project Updates
- Check out the new unofficial German-language Rust forums.
- rust-cpp. Embed C++ directly inside your rust code.
- rustty. A terminal UI library.
- coalesce-rs. Combine disjoint types that share common traits.
- mdBook. Create a book from markdown files.
- Serde 0.5.0 adds support for bincode.
- Cargo Crusader 0.1. A tool for validating changes to APIs prior to publishing.
- Ivan Jager
- Jan Likar
- Marko Lalic
- Matt Friedman
- Mike Marcacci
- Tim Neumann
First off, we had a great RustCamp last weekend! As many of us were involved with the event, it was a bit of a slow week.
Decisions from last week:
- RFC PR #1184: RFC: Stabilize the #![no_std] attribute
- RFC PR #1183: RFC: Allow changing the default allocator
- RFC PR #770: io error handling design
- RFC PR #980: read_exact
- RFC PR #1194: RFC: Add item recovery collection APIs
- To be merged, pending last bits of bikeshedding
- PR #26818: Stabilize duration (with renamings)
- Merge, need to decide about 1.3 backport
We'd like to call attention to the following two policy RFCs:
- PR #1242: RFC: policy for rust-lang crates
- PR #1224: Update the RFC process with sub-teams, amongst other things.
as well as an RFC relating to
catch_panic and exception safety in Rust:
- PR #1236: RFC: Stabilize catch_panic
This week's RFCs going into (or staying in) final comment period:
The following RFCs are being promoted to final comment period:
- PR #886: Permit
#[must_use]attributes on functions as well as types. This allows for functions whose return value should not be ignored even if the type of that value is unexceptional (e.g., the
- PR #890: Custom
preludes. This RFC proposes an extension that allows crates to
define their own preludes. This can be used to have common names
available throughout a crate without forcing them to be explicitly
imported everywhere. This is particularly useful when combined with
the convention of having external crates define a
pub mod preludethat downstream crates can import into their own local preludes. While clearly convenient, there were some concerns raised that this will give rise to multiple dialects of Rust.
- PR #953: This defines
traits to support
+=and other operators, closing a gap in our operator overloading support. The traits take the LHS via an
&mutreference to permit in-place updates, take the RHS by value, and do not require that the
Addtrait also be implemented.
- PR #1135: This PR
permits raw fat pointers (e.g.,
*Trait) to be compared, just like raw thin pointer (e.g.,
*i32). The semantics are to compare both the pointer itself and any accompanying data (e.g., the length of the slice).
- PR #1189: This PR simply corrects typos.
The following two RFCs have been accepted:
- PR #1214: Clarify (and improve) rules for projections and well-formedness.
- PR #1219: Allow aliasing imports when importing as a group.
In addition, I would like to call attention to the following RFC:
- PR #1238: Nonparametric dropck. This RFC simplifies the dropck rules to close some soundness holes and make room for specialization. The change is expected to cause little to no breakage in practice, e.g., a crater run found no affected crates, but it nonetheless affects a core component of the language.
PR #27551, which
changes how structs and enums are represented in the compiler,
replacing various hashtables with a single
AdtDef struct. This is a
reimplementation of a similar PR by @aatch. In addition to cleaner
code, it results in a small performance boost (approximately 5%).
There has been some progress towards removing drop flags. @pnkfelix landed his "nonzeroing move hints" branch (PR #26173). Unfortunately, some critical bugs were found shortly thereafter. The fix (PR #27413) is not yet ready.
- 8/10. Seattle.
- 8/11. San Diego.
- 8/18. Sydney.
- 8/19. Los Angeles.
- 8/20. Berlin.
- 8/26. Columbus Rust Society.
- 8/31. Paris.
fn work(on: RustProject) -> Money
There are some jobs writing Rust! This week's listings:
- Student Research Assistant in Karlsruhe, Germany for embedded development on ARM stm32. Contact Oliver Schneider
Quote of the Week
<bluss> I've tried using unchecked indexing in non-trivial code now a couple of times. It never makes a big difference <bluss> Profiling shows like 1-2% improvement if that <bluss> so it's the tightest loops you should worry about, not much more
@bluss knows a few things about micro-optimization.
Thanks to @bluss for the tip. Submit your quotes for next week!.