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 a pull request. 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
- Announcing Rust 1.20.
- Rust 2017 survey results.
- Welcome cramertj to the lang team!
- elfmalloc performance evaluation - a pure Rust allocator that's competitive on performance with jemalloc.
- Announcing Rust Qt binding generator.
- Announcing a fast JSON parser which picks up values directly without performing tokenization.
- Getting started with artifact - a design documentation tool.
- 5 tips for writing small CLI tools in Rust.
- Generating C bindings for Rust crates with cbindgen.
- Librsvg's build infrastructure: Autotools and Rust.
- Replacing a shells script with strongly typed Rust code.
- Outreachy: Wrapping up work on Rust Lifetime Errors.
- Rust Belt Rust 2017 sessions announced.
- This week in Rust docs 71.
- [podcast] Request for explanation #10 - Two paths diverged in a yellow wood. This week's RFC is RFC 2126 "Clarify and streamline paths and visibility" (aka "The modules RFC").
- [videos] Talks from RustConf 2017.
Crate of the Week
This week's crate is brain, a programming language transpiler to brainfuck of all things! Thank you, icefoxen for the weird suggestion. It's appreciated!
Submit your suggestions and votes 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.
- Help test async/await/generators/coroutines.
- [medium] allocators-rs: mmap-alloc: Support full Alloc API.
- [medium] allocators-rs: bsalloc: Support allocation failures.
- [easy] allocators-rs: Add links in documentation.
- [medium] allocators-rs: Travis: Spurious test failures on Mac.
- [easy] bindgen: Add
bindgen::Builder::derive_copy
to control whether we emitderive(Copy)
on type definitions. - [medium] sysconf: page: Add default hugepage support on Linux.
- rust-machine-id: windows: add implementation.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
120 pull requests were merged in the last week
- mark allocation functions as
nounwind
String::splice
no longer returns aSplice
- libsyntax
Span
fields are now private (plugin-breaking) align_offset
intrinsic- clippy is now a submodule
method::probe
no longer does hacky trait selection (some breakage, see #44224)errors::Handler::reset_err_count
core::option::Option<&mut T>::cloned
- fix
alloc_jemalloc
debug
feature - warn when rustdoc HTML rendering differs
- fix
proc_macro
expansion on trait methods - fix reachability with cross-crate generators
- generalize
on_unimplemented
(allows to generate better compiler errors) CodeExtent
now usesItemLocalId
instead ofNodeId
- Allow
|
prefix in match arms (RFC #1925) - stabilize
mem::discriminant
- flag 128-bit integers as FFI-unsafe
New Contributors
- Andrew Gauger
- Andy Gauge
- Jeremy Sorensen
- Lukas H
- Phlosioneer
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:
- [disposition: merge] Clarify and streamline paths and visibility.
- [disposition: merge] Nested groups in imports.
- [disposition: postpone] Add the
()
→Result<(), _>
coercion rule, for removingOk(())
everywhere. - [disposition: merge] In-band lifetime bindings.
- [disposition: merge] Autoreferencing
Copy
types. - [disposition: postpone] Ok wrapping: Improved support for writing code from an error handling mindset.
- [disposition: merge] Attributes for tools, 2.0.
- [disposition: merge] Infer
T: 'x
outlives requirements on structs. - [disposition: merge] Implied bounds.
- [disposition: merge] Allow Irrefutable Patterns in if-let and while-let statements.
- [disposition: merge] Add impl Trait type alias and variable declarations.
- [disposition: merge] stable mechanism to specify the behavior of panic! in no-std applications.
- [disposition: merge] Evolving Rust through Epochs.
- [disposition: merge] Add
align_offset
intrinsic and[T]::align_to
function. - [disposition: postpone] Const/static type annotation elision.
- [disposition: merge] Const generics.
- [disposition: merge] Add external doc attribute to rustc.
- [disposition: close] Allow crates to specify the version of Rust in which they are written.
- [disposition: merge] Copy/Clone closures. Implement
Clone
andCopy
for closures where possible. - [disposition: merge] Compiler-generated Clone impls for arrays and tuples.
New RFCs
Style RFCs
Style RFCs are part of the process for deciding on style guidelines for the Rust community and defaults for Rustfmt. The process is similar to the RFC process, but we try to reach rough consensus on issues (including a final comment period) before progressing to PRs. Just like the RFC process, all users are welcome to comment and submit RFCs. If you want to help decide what Rust code should look like, come get involved!
The RFC style is now the default style in Rustfmt - try it out and let us know what you think!
We're currently writing up the discussions, we'd love some help. Check out the tracking issue for details.
PRs:
Upcoming Events
- Sep 7. Rust release triage.
- Sep 11. Seattle Rust Monthly Meetup.
- Sep 12. Rust Berlin Meetup - September 2017.
- Sep 13. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Sep 13. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Sep 14. Rust Washington, DC - Hacktember.
- Sep 14. Columbus Rust Society - Monthly Meeting.
- Sep 20. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Sep 20. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Sep 20. OpenTechSchool Berlin - Rust Hack and Learn.
- Sep 21. Rust release triage.
If you are running a Rust event please add it to the calendar to get it mentioned here. Email the Rust Community Team for access.
Rust Jobs
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
you can ask a Future “are we there yet”, to which it can answer “yes”, “no”, or "don’t make me come back there" an Iterator is something you can keep asking “more?” until it gets fed up and stops listening Display is just a way to say “show me your moves”, with the other formatting traits being other dance moves if something isn’t Send, then it’s a cursed item you can’t give away, it’s yours to deal with if something isn’t Sync, then it won’t even appear for other people, it’s possibly an apparition inside your head things that are Clone can reproduce asexually, but only on command. things that are Copy won’t bother waiting for you
— @QuietMisdreavus on Twitter.
Thanks to Havvy for the suggestion.