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.26.2. ππ
- How to speed up the Rust compiler some more in 2018.
- The future of Clippy (the Rust linter).
- Async methods I: generic associated types.
- Async methods II: object safety.
- Avoiding the pyramid of doom.
- The Rust way of OS development.
- The secret life of Cows.
- The state of Gotham.
- Optimising path tracing with SIMD.
- Writing a simple web service in Rust with actix-web.
- Newtype index pattern.
- Tricking the HashMap.
- The Rust language and special cases.
- aturon.log: listening and trust, part 2.
- Introducing feL4: Rust programs for the seL4 microkernel.
- hyper v0.12 is released.
- This week in Rust docs 107.
- This week in Rust and WebAssembly 3.
- [podcast] New Rustacean: Crates you should know: wasm. wasm intro, wasm-bindgen, and wasm-pack.
- [podcast] Rusty Spike Podcast - episode 31. 1.26.1 release, RustFest videos, Rust reach, RustRush 2018, and a bit of behind the scenes look at running Rust.
Crate of the Week
This week's crate, as decreed by llogiq, is im, a library for immutable data structures in Rust.
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.
- wasm-pack has several open good first issues available to new contributors.
- Get started with these beginner-friendly issues.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
149 pull requests were merged in the last week
- fix building rustc on and for musl hosts
- add polonius compare mode
- make borrowck use polonius output
- register outlives predicates from queries the right way around
- resolve: make sure indeterminate and inconsistent macro resolutions always generate errors
- typeck: do not pass the field check on field error
- make GlobalCtxt thread-safe
- stabilize short error format
- suggest using
as_ref
on some borrow errors - merge unused-extern-crate and unnecessary-extern-crate lints
- make anon params lint warn-by-default
- do not promote union field accesses
- make const decoding thread-safe
impl Default for &mut str
- const fn integer operations
- every match arm reads the match's borrowed input
- also check
let
arms and nested patterns for mutable borrows - implement
#[panic_implementation]
- OOM handling changes
- make the OOM hook return
()
rather than!
std::fs::DirEntry.metadata
: use fstatat instead of lstat when possible- add missing Wrapping methods, use doc_comment!
- optimize joining for slices
- hash up to 8 bytes at once with
FxHasher
- two minor parsing tweaks
- make
Layout
's align aNonZeroUsize
- make some std::intrinsics
const fn
s - simplify
HashMap
layout calculation by usingLayout
- optimize layout calculations in
HashMap
- fs: copy: use copy_file_range on Linux
- add
From<bool>
for int types - add
as_nanos
function toDuration
Arc
downcast- stabilize SliceIndex trait
- stabilize SystemTime::UNIX_EPOCH
- cargo: verify that src dir wasn't modified by
build.rs
when publishing - cargo: fix a deadlock issue
- Rust Logo on a diet
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.
RFCs
No RFCs are currently in final comment period.
Tracking Issues & PRs
- [disposition: merge] Tracking issue for the GlobalAlloc trait and related APIs.
- [disposition: merge] Stabilize GlobalAlloc and
#[global_allocator]
. - [disposition: merge] Tracking issue for
ToOwned::clone_into
(toowned_clone_into
). - [disposition: merge] Tracking issue for "macro naming and modularisation" (RFC #1561).
- [disposition: merge] Tracking issue for promoting
!
to a type (RFC 1216). - [disposition: merge] Exhaustive integer matching.
- [disposition: merge] Stabilize
std::path::Path::ancestors
. - [disposition: merge] Add ability to apply custom derive to union types.
New RFCs
Upcoming Events
- Jun 10. Mountain View, US - Open Table / Icebreaker: what projects are you working on.
- Jun 11. Seattle, US - Monthly meetup.
- Jun 12. Rome, IT - Rust learning and hacking evening #9.
- Jun 13. Berlin, DE - OpenTechSchool - Rust Hack and Learn.
- Jun 13. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Jun 13. Vancouver, CA - Rust Study/Hack/Hang-out night.
- Jun 14. Columbus, US - Columbus Rust Society - Monthly Meeting.
- Jun 14. San Diego, US - San Diego Rust June Meetup.
- Jun 14. Utah Valley, US - Utah Rust meetup.
- Jun 17. Mountain View, US - Open Table / Icebreaker: what projects are you working on.
- Jun 19. Denver, US - Rust Boulder/Denver - June Meetup in Boulder.
- Jun 19. Rust Community Content Subteam Meeting at #rust-content on irc.mozilla.org.
- Jun 20. Rust Events Team Meeting.
- Jun 20. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Jun 21. Cambridge, GB - Cambridge Rust Meetup.
- Aug 17. Portland, US - RustConf 2018. Registration is now open.
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
When picking up a lentil (Result) a pigeon (?) must consider two options. If the lentil is a good one (Ok), the pigeon simply puts it into the pot (evaluates to the wrapped value). However, if the lentil happens to be a bad one (Err), the pigeon eats it, digests it (from) and finally βreturnsβ it. Also the silhouette of a pigeon kind of resembles a questionmark.
β anatol1234 on internals
Thanks to Christopher Durham for the suggestion!