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
No newsletters or research papers this week.
Official
Project/Tooling Updates
- rust-analyzer Changelog #77
- IntelliJ Rust Changelog #147
- GCC Rust Weekly Status Report 15
- MoonZoon Dev News (3): Signals, React-like Hooks, Optimizations
- Alacritty Version 0.8.0
- Micromath 2.0.0: approximation-based embedded arithmetic, 2D/3D vector, quarternion, and statistics library
- This Week In TensorBase 3
Observations/Thoughts
- Authorization mechanisms in Rust web applications
- Scylla Developer Hackathon: Rust Driver
- Plugins in Rust: The Technologies
- gRPC load-balancing in Rust
- Verifying vectorized Rust revisited
- Routes to Discovering Rust
- How we utilized fuzzing to improve security in the TezEdge node and created an open-source CI tool for Rust code fuzzing
- Boost productivity with Rust
- Building Outer Wonders for Linux
- Behind the scenes of 1Password for Linux
- Writing Pythonic Rust
- Upgradable parking_lot::RwLock might not be what you expect
Rust Walkthroughs
- Understanding Rust Privacy and Visibility Model
- Things you can't do in Rust (and what to do instead)
- State Management With WebAssembly and Rust
- Implementing Linked List in Rust
- How to use gRPC with Rust Tonic and Postgres database with examples
- Generating pre-signed S3 URLs in Rust
- A simple user input collection, validation, and conversion library in Rust
- How to make a cryptocurrency Telegram bot with Rust and Teloxide
- Infinite Mixture Model in Rust with RV 0.12
- Optimizing HashMaps even more
- Inventing the Service trait
- Rust Macros Rule: DRY warp Routes
- Error Handling in Rust - A Deep Dive
- [DE] Speicherverwaltung in Rust
- [ES] Cómo utilizar Rust web framework Warp
- [PT] O que é dyn no Rust?
- [ZH] Practice of rendering markdown to HTML in Rust (Rust web 开发中,将 markdown 渲染为 HTML 的实践)
- [ZH] [series] Build GraphQL services based on Async Rust using actix-web + async-graphql + rbatis + postgresql / mysql (基于 actix-web + async-graphql + rbatis + postgresql / mysql 构建异步 Rust GraphQL 服务) - Part 4
- [video] The Rust Borrow Checker - A Deep Dive @ Rust DC, April 20 2021 w/ Nell Shamrell-Harrington
Miscellaneous
- James Munns on the state and the future of embedded & safety-critical Rust | Emergence Podcast
- Rust 2021 edition to arrive in October with 'more consistent panic' and other new features
- SpaceX about the Rust Programming Language!
Crate of the Week
This week's crate is arraygen, a derive proc macro to generate arrays from structs.
Thanks to José Manuel Barroso Galindo for the nomination
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.
No issues were proposed for CfP.
Updates from Rust Core
333 pull requests were merged in the last week
- add auto traits and clone trait migrations for (RFC #2229)
- insignificant destructors for RFC #2229
- add
asm!()
support for PowerPC - add
asm!()
support for PowerPC64 - add support for const operands and options to
global_asm!
- recover from invalid struct item syntax
- fix diagnostic for cross crate private tuple struct constructors
- fix suggestions for missing return type lifetime specifiers
- suggest adding a type parameter for impls
- fix stack overflow when checking for structural recursion
- implement span quoting for proc-macros
- handle more span edge cases in generics diagnostics
- improve diagnostics for GATs
- show macro name in 'this error originates in macro' message
- store
VariantIdx
to distinguish enum variants - remove
CrateNum
parameter for queries that only work on local crate - adjust target search algorithm for rustlib path
- don't suggest adding
'static
lifetime to arguments - improve error message for non-exhaustive matches on non-exhaustive enums
- allow
async {}
expressions in const contexts - warn about unused pub fields in non-pub structs
- fix unused attributes on
macro_rules
- box
Impl.blanket_impl
to reduce size #[inline(always)]
on basic pointer methods- make
unchecked_
{add
,sub
,mul
} inherent methods unstably const - BTree: no longer copy keys and values before dropping them
str::is_char_boundary
- slight optimization- futures-macro: improve diagnostics on type mismatch
- futures: implement
try_chunks
- futures: change
SelectAll
iterators to return stream instead ofStreamFuture
- futures: expose iterators from
SelectAll
- futures:
SelectAll::clear
- futures:
FuturesUnordered::clear
- futures: change
StreamExt::scan
to pass state to closure by value - futures: abortable streams
- cargo: improve performance of git status check in
cargo package
- rustdoc: minimize amount of fake DefIds used in rustdoc
- clippy: add
needless_bitwise_bool
lint - clippy: new lint:
unused_async
- clippy: move
inconsistent_struct_constructor
topedantic
- clippy:
needless_collect
enhancements - clippy:
while_let_on_iterator
improvements - clippy: add
Sized
trait forwrong_self_convention
lint test - clippy:
match_single_binding
: fix invalid suggestion when match scrutinee has side effects - clippy: trigger
wrong_self_convention
only if it has implicit self - clippy: stop linting else if let pattern in
option_if_let_else
lint - clippy: fix false positives about generic args
- clippy: fix a
manual_unwrap_or
false positive with deref coercion
Rust Compiler Performance Triage
A lot of noise in the benchmark results this week. We are discussing (zulip archive, live zulip) how best to update the benchmark set to eliminate the noisy cases that are bouncing around. Beyond that, some large improvements to a few individual benchmarks.
The memory usage (max-rss) seemed largely flat. Except for an upward trend on tuple-stess
that indicates 4% more memory from a week ago.
Triage done by @pnkfelix. Revision range: 382f..25a2
5 Regressions, 7 Improvements, 2 Mixed 1 of them in rollups
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
- [disposition: merge] RFC: 2021 Edition
- [disposition: postpone] Allow Overloading || and &&
Tracking Issues & PRs
- [disposition: merge] stabilize const_fn_unsize
- [disposition: merge] rustc: Allow safe #[target_feature] on wasm
- [disposition: merge] stabilize int_error_matching
- [disposition: merge] Show test type during prints
- [disposition: merge] stabilize member constraints
- [disposition: merge] Move UnwindSafe, RefUnwindSafe, AssertUnwindSafe to core
- [disposition: merge] Use try_reserve in Vec's io::Write
- [disposition: merge] Add functions
Duration::try_from_secs_{f32, f64}
- [disposition: close] Allow unused variables with todo!
New RFCs
Upcoming Events
Online
- May 19, 2021, Vancouver, BC - Rust Study/Hack/Hang-out night - Vancouver Rust
- May 20, 2021, Online - Go vs Rust | Round table discussion
- May 20, 2021, Dallas, TX, US - Last Tuesday - Dallas Rust
- May 25, 2021, Berlin, DE - Rust and Tell - Berline.rs
- May 27, 2021, Montréal, QC, CN - Rust MTL: Building a Scrabble AI with the fst crate - Rust Montréal
- June 1, 2021, Buffalo, NY, US - Buffalo Rust User Group, First Tuesdays - Buffalo Rust Meetup
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
Protocol Labs
Amazon Web Services
Techno Creatives
Paige
ANIXE
NZXT
Zondax
Ockam
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
I often think about Rust as a process and community for developing a programming language, rather than as a programming language itself.
– throwaway894345 on hacker news
Thanks to Krishna Sundarram for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.