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
Official
Newsletters
Project/Tooling Updates
- rust-analyzer changelog #142
- IntelliJ Rust Changelog #176
- Introducing Rust Sitter
- SecureStore 0.100: KISS, git-versioned secrets management for rust
- This week in Fluvio #42: The programmable streaming platform
- HexoSynth 2022 - Devlog #9 - MIDI Note and CC Handling
- Rust Search Extension v1.8.0 has been released.
- This week in Databend #55: A Modern Cloud Data Warehouse for Everyone
Observations/Thoughts
- Comparing Rust's and C++'s Concurrency Library
- Kernel Driver with Rust in 2022
- IntoIterator and the for ... in Syntax in Rust
- Rust in Perspective — linusw
- 6 Things I Wish I Knew Starting with Embedded Rust
Rust Walkthroughs
- Exploring Traits with Erased
serde
- Rust and Neovim - A Thorough Guide and Walkthrough
- Get Started with Rust: Structs
- Hooking Go from Rust - Hitchhiker’s Guide to the Go-laxy
- Using the Kani Rust Verifier on Tokio Bytes
- [video] Rust image viewer from scratch
- [video] Rust is not a faster horse (why Rust is different)
- [video] Fiberplane's path to full-stack WASM development
Research
Miscellaneous
- Rust Iterator pattern with iter(), into_iter() and iter_mut() methods
- [DE] Rust: Makros - Einführung in ein unverzichtbares Werkzeug
- [DE] Rust 1.63 bekommt Threads, die sich Daten ausleihen dürfen
Crate of the Week
This week's crate is cargo-pgo, a cargo subcommand to compile your code with profile-guided optimization and BOLT for good measure.
Thanks to Jakub Beránek for the self-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.
- ockam - Add examples section to ockam message send command's help
- ockam - ockam completion --shell {bash|zsh|fish} command for shell completion
- ockam - Visualize identity change history in ockam identity show --full command
- mirrord - Cache doesn't work on test-agent workflow
- mirrord - Split mirrord-layer LayerError based on criteria
Updates from the Rust Project
410 pull requests were merged in the last week
- make
[rust] use-lld=true
work on windows - debuginfo: generalize C++-like encoding for enums
- recover from mutable variable declaration where
mut
is placed beforelet
- suggest a missing semicolon before an array
- suggest adding an appropriate missing pattern excluding comments
- suggest const and static for global variable
- suggest removing
let
ifconst let
orlet const
is used - suggest removing a semicolon after impl/trait items
- suggest the path separator when a dot is used on a trait
- adjust span of fn argument declaration
- point to generic or arg if it's the self type of unsatisfied projection predicate
- do not manually craft a span pointing inside a multibyte character
- argument type error improvements
- set tainted errors bit before emitting coerce suggestions
- iterate
generics_def_id_map
in reverse order to fix P-critical issue - miri: atomics must be mutable
- make
TypeError
implCopy
- determine
match_has_guard
from candidates instead of looking up thir table again - optimize thread ID generation
- simplify visitors
- simplify
format_args
builtin macro implementation - stabilize
backtrace
- stabilize
ptr_const_cast
- replace pointer casting in
hashmap_random_keys
with safe code - add
Iterator::array_chunks
(take N+1) - optimize
next
andnth
implementations ofSkip
- compiler-builtins: remove
c32()
fromx86_64
memcmp
- cargo: only override published resolver when the workspace is different
- cargo: use
std::thread::scope
to replace crossbeam - rustdoc: don't document impossible to call default trait items on impls
- rustdoc: avoid ICE in rustdoc when using
Fn
bounds - rustdoc: improve crate selection on rustdoc search results page
- rustdoc: don't render impl blocks with doc comment if they only contain private items by default
- rustdoc: fix handling of stripped enum variant in JSON output format
- rustdoc: use a more compact encoding for implementors/trait.*.js
- clippy: add lint recommending using
std::iter::once
andstd::iter::empty
- clippy: add
partialeq_to_none
lint - clippy: extend
if_then_some_else_none
to also suggestbool::then_some
- clippy: fix
if_let_mutex
not checking mutexes behind refs - clippy: fixes
trait_duplication_in_bounds
false positives - clippy: skip
unnecessary_to_owned
whent != t.to_string()
- clippy: use
check_proc_macro
formissing_const_for_fn
- rust-analyzer: do not unconditionally succeed RUSTC_WRAPPER checks when run by build scripts
- rust-analyzer: fix pattern field completions not working for unions
- rust-analyzer: move VSCode diagnostics workaround into client code
- rust-analyzer: pad empty diagnostic messages in relatedInformation as well
- rust-analyzer: recover from missing ellipsis in record literals for path expressions
- rust-analyzer: remove imports that are also in edition 2021's prelude
- rust-analyzer: fix incorrect type mismatch with
cfg_if!
and other macros in expression position - rust-analyzer: infer byte string pattern as
&[u8]
when matched against slices
Rust Compiler Performance Triage
A fairly quiet week for performance, with the exception of the LLVM 15 upgrade which resulted in many changes, mostly to the positive.
Triage done by @simulacrum. Revision range: cc4dd6fc9f..14a459b3
Summary:
(instructions:u) | mean | max | count |
---|---|---|---|
Regressions ❌ (primary) |
0.7% | 7.7% | 62 |
Regressions ❌ (secondary) |
1.3% | 5.0% | 51 |
Improvements ✅ (primary) |
-1.8% | -6.9% | 93 |
Improvements ✅ (secondary) |
-2.4% | -22.0% | 128 |
All ❌✅ (primary) | -0.8% | 7.7% | 155 |
2 Regressions, 4 Improvements, 2 Mixed; 1 of them in rollups 38 artifact comparisons made in total
Call for Testing
An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization. The following RFCs would benefit from user testing before moving forward:
- No RFCs issued a call for testing this week.
If you are a feature implementer and would like your RFC to appear on the above list, add the new call-for-testing
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
need testing.
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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: close] Tracking Issue for
Result::into_ok_or_err
/feature(result_into_ok_or_err)
- [disposition: merge] Tracking issue for RFC 2046, label-break-value
- [disposition: merge] Tracking Issue for
#![feature(mixed_integer_ops)]
- [disposition: merge] Tracking Issue for
std::io::read_to_string
New and Updated RFCs
- [new] Add atomic memcpy RFC.
Upcoming Events
Rusty Events between 2022-08-17 - 2022-09-14 🦀
Virtual
- 2022-08-17 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2022-08-17 | Virtual (Hoboken, NJ, US) | Neighborhood Math Club
- 2022-08-17 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2022-08-18 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2022-08-18 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-08-18 | Virtual (Tehran, IR) | Iran Rust Meetup
- 2022-08-18 | Virtual (Wiesbaden, DE) | Frontend RheinMain
- 2022-08-20 | Virtual | Rust Edu
- 2022-08-24 | Virtual (Beijing, CN) | WebAssembly and Rust Meetup (Rustlang)
- 2022-08-24 | Virtual + Wellington, NZ | Rust Wellington
- 2022-08-25 | Virtual (Karlsruhe, DE) | The Karlsruhe Functional Programmers Meetup Group
- 2022-08-27 | Virtual (Bangalore, IN) | Polkadot India
- 2022-08-30 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2022-08-30 | Virtual + Dallas, TX, US | Dallas Rust
- 2022-09-01 | Virtual | Google Open Source Live
- 2022-09-02 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-09-03 | Virtual (Bangalore, IN) | Polkadot India
- 2022-09-03 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-09-04 | Virtual (Seattle, WA, US) | Seattle Rust Meetup
- 2022-09-06 | Virtual (Beijing, CN) | WebAssembly and Rust Meetup (Rustlang)
- 2022-09-06 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2022-09-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-09-10 | Virtual | Rust GameDev
- 2022-09-10 | Virtual (Bangalore, IN) | Polkadot India
- 2022-09-13 | Virtual (Rostock, DE) | Altow Academy
- 2022-09-14 | Virtual (Malaysia)| Golang Malaysia
Europe
- 2022-08-18 | Paris, FR | Rust Paris
- 2022-08-25 | Stockholm, SE | StockholmCpp
- 2022-08-30 | Utrecht, NL | Rust Nederland
North America
- 2022-08-23 | Toronto, ON, CA | Rust Toronto
- 2022-08-25 | Ciudad de México, MX | Rust MX
- 2022-08-25 | Lehi, UT, US | Utah Rust
- 2022-08-31 | New York, NY, US | Rust NYC
Oceania
- 2022-08-24 | Wellington, NZ + Virtual | Rust Wellington
- 2022-08-26 | Melbourne, VIC, AU | Rust Melbourne
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.
Jobs
Please see the latest Who's Hiring thread on r/rust
Quote of the Week
TL;DR: my claim is that Rust is attempting to raise the abstraction in the programming language and ultimately to join computer science and software engineering into one single discipline, an ambition that has been around since these disciplines were created.
Thanks to Julian Wollersberger for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin.
Email list hosting is sponsored by The Rust Foundation