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
Official
- Launching the Lock Poisoning Survey
- Next steps for the Foundation Conversation
- Rust Survey 2020 Results
- [Inside] Changes to Rust Compiler Team
Newsletters
Tooling
- IntelliJ Rust Changelog #137
- Rust Analyzer Changelog #55
- Knurling-rs Changelog #10
- These Months in explaine.rs
- Cargo2nix 0.9.0 release notes
Observations/Thoughts
- FFI-Safe Polymorphism: Thin Trait Objects
- Adding BPF target support to the Rust compiler
- Why Rust Has a Bright Future in the Cloud
- Closures: Magic Functions
- Notes on cross-compiling Rust
- Polymorphism in Rust: Enums vs Traits
- Beyond R and Python: Rust for Science
- Pointers Are Complicated II, or: We need better language specs
- Serde tricks: The lesson learnt from refactoring rspotify
- Notes On Lock Poisoning
- I tried to make the fastest sorting algorithm I could think of... in Rust
- Still Rusting - One Year Later
- 6 Principles for Building Robust Flexible Shared Data Apps with Rust & MongoDB
- [video] The Unsafe Chronicles: Exhibit A: Aliasing Boxes
Rust Walkthroughs
- Make A Language - Part Fourteen: Comments
- Make A Language - Part Fifteen: Markers
- Rust, Python and Fish
- Chess game in Rust using Bevy
- Rust on the BBC micro:bit
- Developing smart contracts with ink!
- Learn SixtyFPS: Memory Game Tutorial (Rust)
- Aiming for correctness with types
- Zero to Production in Rust #6: Using Types To Guarantee Domain Invariants
- FFI-Safe Polymorphism: Thin Trait Objects
- Distributing Rust Analyzer with Nix and Cargo2nix
- [PL] CrabbyBird #4 Generowanie świata gry – cześć II
- [video] How oso built a runtime reflection library for Rust
- [video] Implementing Rust's Vec From Scratch
- [RU] [video] Rust: Not as hard as you think / Russian Rust Online Meetup
Project Updates
- These Months in explaine.rs
- Sequoia PGP released version 1.0
- Connect devices to blockchains with Léger
Miscellaneous
- Signal Group Calls are powered by Rust
- Rust's Option in One Figure
- Authors of "Programming Rust 2nd Edition" have a sense of humor
- Rotating the compiler team leads
- Debug Rust on PineCone BL602 with VSCode and GDB
- [RU] [audio] SitCast#32 - Эх, Rust, да ещё Rust…
Crate of the Week
This week's crate is thermite, a SIMD struct-of-arrays-algorithms library.
Thanks to Willi Kappler for the suggestion!
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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
300 pull requests were merged in the last week
- fixes to Rust coverage
- properly re-use def path hash in incremental mode
- add some
core::cmp::Ordering
helpers - constify some
MaybeUninit
methods - Windows TLS:
ManuallyDrop
instead ofmem::forget
- use
is_write_vectored
to optimize thewrite_vectored
implementation forBufWriter
- enforce no-move rule of
ReentrantMutex
usingPin
and fix UB in stdio - hashbrown: enable specialization with aHash
- future:
SinkExt::feed
- futures-util: migrate from pin-project to pin-project-lite
- cargo: check if rerun-if-changed points to a directory
- cargo: workaround fs issue in
cargo publish
- clippy: add MSRV to more lints
- rustfmt: don't force a newline after an empty where clause
Rust Compiler Performance Triage
- 2020-12-15: 6 Regressions, 1 Improvements, 2 Mixed
This week was fairly quite with lots of small regressions. Most of the regressions were either for fixes to changes that yielded large performance wins in previous weeks or small performance losses where there is already a plan for how to gain those losses back.
Triage done by @rylev.
See the full report for more.
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
No RFCs were approved 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
Tracking Issues & PRs
- [disposition: merge] Implement
From<char>
for u64 and u128. - [disposition: merge] Stabilize
unsafe_cell_get_mut
- [disposition: merge] Move
{f32,f64}::clamp
to core - [disposition: merge] Stabilize all stable methods of
Ipv4Addr
,Ipv6Addr
andIpAddr
as const - [disposition: merge] Acknowledge that
[CONST; N]
is stable - [disposition: merge] Deprecate atomic compare_and_swap method
- [disposition: merge] Stabilize
core::slice::fill
- [disposition: close] Made matches! more useful by adding mapping support
- [disposition:merge] stabilize
#![feature(min_const_generics)]
- [disposition:merge] Add
impl Div<NonZeroU{0}> for u{0}
which cannot panic - [disposition: merge] passes: prohibit invalid attrs on generic params
- [disposition: merge] stabilize deque_range
- [disposition: merge] Rename
overlapping_patterns
lint - [disposition: merge] Stabilize or_insert_with_key
- [disposition: close] Add built-in implementations of
Default
for function definition and… - [disposition: merge] Mark
-1
as an available niche for file descriptors - [disposition: merge] Stabilize the Wake trait
- [disposition: merge] Tracking issue for map_ok and map_err method for
Poll<Option<Result<T, E>>>
New RFCs
- Add min_target_api_version cfg predicate
- Cargo: providing artifacts (for artifact dependencies) via build.rs
Upcoming Events
Online
- December 16, Vancouver, BC, US - Are Results just Checked Exceptions? - Vancouver Rust
- December 29, Dallas, TX, US - Last Tuesday - Dallas Rust
If you are running a Rust event please add it to the calendar to get it mentioned here. Please remember to add a link to the event too. Email the Rust Community Team for access.
Rust Jobs
- Senior Software Engineer (Rust & C++) at NZXT (Remote)
- Software Development Engineer at Amazon Web Services (Seattle, WA, US)
- Full remote Rust developer, long-term contract (French CDI) at Massa Labs (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Engineering is not about "not doing mistakes". Engineering is about designing systems that ensure fewer mistakes occur.
Rust is such a system.
Thanks to Joshua Nelson for the suggestion.
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.