Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. 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
Foundation
Project/Tooling Updates
- This week in Fluvio #9: the programmable streaming platform
- SixtyFPS (GUI crate): Changelog for 17th of October 2021
- What's new in SeaORM 0.3.0
- Annoucing the ogma project v0.1: a shell-like scripting language for tabular data
- Rust on Espressif chips - 18-10-2021
- Rust Analyzer Changelog #99
- This week in Databend #12: an elastic and reliable cloud warehouse
Observations/Thoughts
- How Rust developers are making the web safer
- Overhead of Returning Optional Values in Java and Rust
- Designing an API Client in Rust: New Rspotify Version a Year Later
- [video] [Rust Working Group] Rust for Visual Effects - Anders Langlands, Owen Nelson, Luke Titley
Rust Walkthroughs
- Structuring, testing and debugging procedural macro crates
- Custom Logging in Rust using tracing and tracing-subscriber
- WSL2 and Embedded Rust
- Rust Guide: Generics Part 2
- Making slow Rust code fast - performance tuning using Criterion.rs and flamegraphs
- Builder pattern in Rust
- Solana: How to send custom instructions via instruction data
- Hexagonal architecture in Rust #7 - Long-lived repositories
- [JA] Rust 関数オーバーロード、引数の数が異なる場合
- [video] Getting started with Rust 🦀 2021: 7b. Building a GUI app in Rust [Part B]
- [video] Processing Shaders with Rust
- [video] "Streaming video analysis in Rust using Pravega" by Tom Kaitchuck
- [video] Rust for Java Developers 3/3 - Understanding Ownership
Miscellaneous
- Results from the OpenSUSE 2021 Rust Survey
- Academy Software Foundation Announces Formation of Rust Working Group, Initial Release of OpenEXR Rust Binding
- ROAPI: An API Server for Static Datasets
Crate of the Week
This week's crate is serde_with, a crate of helper macros to ease implementing serde traits for your types.
Thanks to piegames for the suggestion!
Please 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.
- Paccat is looking for contributors
- ockam - Use Zeroize for temporary sensitive data
- ockam - Remove None errors from our error enums
Updates from the Rust Project
353 pull requests were merged in the last week
- fix ICE with
let...else
andref mut
- fix an ICE with TAITs and Future
- suggest
Box::pin
whenPin::new
is used instead - fix incorrect
Box::pin
suggestion - nicer error message if the user attempts to do
let
...else if
- index and hash HIR as part of lowering
- polymorphization: shims and predicates
- optimize
VecDeque::append
- speedup int
log10
branchless - stabilize
unreachable_unchecked
asconst fn
- use
BCryptGenRandom
instead ofRtlGenRandom
on Windows. - make
Option::as_mut
const - make
Result::as_mut
const - add
slice::swap_unchecked
- add
#[repr(i8)]
toOrdering
- add
Poll::ready
and revert stabilization oftask::ready!
- avoid allocations and copying in
Vec::leak
- rustdoc: associated consts sidebar
- rustfmt: stabilize
disable_all_formatting
- clippy: fix false positive of
implicit_saturating_sub
withelse
clause - clippy: do not expand macros in
equatable_if_let
suggestion - clippy:
unnecessary_sort_by
checks if argument implementsOrd
trait - clippy: allow giving reasons for
disallowed_types
- clippy: implement
uninit_vec
lint - clippy: add
format_in_format_args
andto_string_in_format_args
lints - clippy: add lint
transmute_num_to_bytes
- clippy: add
match_str_case_mismatch
lint
Rust Compiler Performance Triage
A week where improvements outweigh regressions. The highlight of the week is the change to split out LLVM profile guided optimization (PGO) and using clang 13 to compile LLVM which led to improvements in many real world crates (e.g., cargo) in the range of 10%. Most regressions were limited and at most in the less than 1% range. We are seeing more performance changes in rollups which are supposed to be performance neutral. We'll have to decide how to best address this.
Triage done by @rylev. Revision range: 9475e609..d45ed750
3 Regressions, 4 Improvements, 2 Mixed; 2 of them in rollups; 34 comparisons made in total
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] Multiple artifact deps on the same crate with different names, for different targets
Tracking Issues & PRs
- [disposition: merge] Stabilize is_symlink() for Metadata and Path
- [disposition: merge] Implement
Termination
forResult<Infallible, E>
- [disposition: close] Port clippy lint
redundant_field_names
to compiler - [disposition: merge] Make two Paths unequal if they differ in trailing slash
- [disposition: merge] Stabilize
File::options()
- [disposition: merge] Tracking Issue for relaxed struct unsizing rules
- [disposition: merge] Tracking Issue for
option_result_unwrap_unchecked
- [disposition: merge] Tracking Issue for inherent_ascii_escape
- [disposition: merge] Tracking Issue for
destructuring_assignment
- [disposition: close] Tracking issue for
slice_concat_ext
stabilization
New RFCs
Upcoming Events
Online
- October 20, 2021, Buffalo, NY, US - Buffalo Rust User Group, Alternate Day - Buffalo Rust
- October 20, 2021, Vancouver, BC, CA - WASM plugin for Istio - Vancouver Rust
- October 22, 2021, Iran - The First Rust Iran online meetup - Rust Iran Meetup
- October 26, 2021, Dublin, IE - Rust Dublin October Remote Meetup 🎃 - Rust Dublin
- October 26, 2021, Berlin, DE - Rust Hack and Learn - Berline.rs
- October 26, 2021, Dallas, TX, US - Last Tuesday - Dallas Rust
- October 27, 2021, London, UK - Rust London Ockam Takeover - Rust London User Group
- October 27, 2021, Phoenix, AZ - Desert Rust Halloween - Desert Rust
- October 28, 2021, Copenhagen, DK - Hack Night #22 - Copenhagen Rust Group
- November 2, 2021, Buffalo, NY, US - 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
Modeldrive
Connected Cars
Bytewax
Timescale
Immunant
Nexthink
Kraken
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
- Senior Rust Engineer - Banking (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
The biggest failure in Rust‘s communication strategy has been the inability to explain to non-experts that unsafe abstractions are the point, not a sign of failure.
Thanks to Alice Ryhl for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.