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
- Non-lexical lifetimes (NLL) fully stable
- Rust Compiler Midyear Report for 2022
- Please welcome Dan to Library Contributors
Foundation
Newsletters
Project/Tooling Updates
- Announcing: MiniRust
- Achieving A Completely Open Source Implementation of Apple Code Signing and Notarization
- Announcing Cargo WAPM
- argmin 0.6.0 and argmin-math 0.1.0 released
- rust-analyzer changelog #141
- Fyrox 0.27 Feature Highlights
- rustc_codegen_gcc: Progress Report #14
- IntelliJ Rust: Updates For the 2022.2 Release Cycle
- Fornjot (code-first CAD in Rust) - Weekly Release - 2022-W32
- Fang, async background processing for Rust
- HexoSynth 2022 - Devlog #8 - A Visual DSP Programming Language
- This week in Databend #54: A Modern Cloud Data Warehouse for Everyone
Observations/Thoughts
- Using unwrap() in Rust is Okay
- A performance retrospective using Rust (part 3)
- The State Of Rust In 2022
- Blocking Sockets and Async
- How does Rust async work?
- Basic Operator Overloading with Traits
Rust Walkthroughs
- Understanding Rust generics and how to use them
- Hot Reloading Rust — for Fun and Faster Feedback Cycles
- The Magic of zerocopy (compared with scroll)
- Not a Yoking Matter (Zero-Copy #1)
- Zero-Copy All The Things! (Zero-Copy #2)
- So Zero It's ... Negative? (Zero-Copy #3)
- What is server middleware
- Rust and WebAssembly without a Bundler
- What are Rust's HTTP extensions?
- Mapping into the serde data model
- Generate Enum Variant with associated values in Rust Analyzer
- 7 ways to pass a string between 🦀 Rust and C
- STM32F4 Embedded Rust at the HAL: I2C Temperature & Pressure Sensing with BMP180
Miscellaneous
Crate of the Week
This week's crate is fang an async background processing crate.
Thanks to Ayrat Badykov 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.
- ctest2 - CTest uses syntex_syntax which doesn't support raw identifiers
- ctest2 - Fails to parse
_
as a const identifier - ockam - Change
ockam tcp-listener create
command for --at NODE and ADDRESS - ockam - Implement the ockam secure-channel list command
- ockam - Make services information displayed with ockam node create | show command more dynamic
- mirrord - Remove unused dependencies from mirrord-layer
Updates from the Rust Project
330 pull requests were merged in the last week
- add support for link-flavor rust-lld for iOS, tvOS and watchOS
- enable function merging when opt is for size
- recover
require
,include
instead ofuse
in item - recover from C++ style
enum struct
- provide suggestion on missing
let
in binding statement - improve diagnostics for
const a: = expr;
- revive suggestions for boxed trait objects instead of impl Trait
- suggest a positional formatting argument instead of a captured argument
- suggest adding/removing
ref
for binding patterns - warn about dead tuple struct fields
- do not exclusively suggest
;
when,
is also a choice - avoid pointing out
return
span if it has nothing to do with type error - always create elided lifetimes, even if inferred
- enable unused_parens for match arms
- prevent ICE for
doc_alias
on match arm, statement, expression - detect type mismatch due to loop that might never iterate
- miri: add
mkstemp
shim for unix - miri: add shim for realpath on unix
- miri: add support for env::home_dir
- miri: also forward --manifest-path to 'cargo metadata'
- miri: fix an ICE in nanosleep()
- miri: implement some missing float functions
- avoid invalidating the CFG in
MirPatch
- remove
fn backtrace
and replace with usages of provider API - add back
Send
andSync
impls onChunksMut
iterators - optimize
pointer::as_aligned_to
- portable SIMD: fix interleave/deinterleave for vectors with only one lane
- codegen_gcc: support symbol visibility
- cargo: improve error message for
no such subcommand
- rustdoc: avoid inlining modules with duplicate names
- rustdoc: do not mark the contents of a skipped module as inlined
- rust-analyzer: add a setting to disable comment continuation in VSCode
- rust-analyzer: add fixups for incomplete in proc-macros
- rust-analyzer: add more constructors and entry-APIs for la-arena
- rust-analyzer: add syntax fixup for while loops
- rust-analyzer: corrected order of printing op and
=
- rust-analyzer: don't switch workspace on vfs file changes from libraries
- rust-analyzer: error Diagnostics appear in the wrong place
- rust-analyzer: fix
test_rainbow_highlighting
gate - rust-analyzer: generate rust type from json
- rust-analyzer: more methods and traits for
la_arena::ArenaMap
- rust-analyzer: parse range patterns in struct and slice without trailing comma
- rust-analyzer: run stable
fmt
&cargo
throughrustup
- rust-analyzer: use an empty expander for ignored non-attribute proc-macros
- rust-analyzer: handle operators like their trait functions in the IDE layer
- rust-analyzer: support associated values in "Generate Enum Variant" assist
- rust-analyzer: fix incorrect token pick rankings
- rust-analyzer: make
concat!
work with char - clippy: add
elapsed_instant
lint - clippy: fix ICE when reading literals with weird proc-macro spans
- clippy: fix
cast_abs_to_unsigned
with code in parens - clippy: fix suggestions for
async
closures inredundant_closure_call
- clippy: more proc-macro detection
- clippy: move
significant_drop_in_scrutinee
intonursery
- clippy: rename
logic_bug
tooverly_complex_bool_expr
- clippy:
explicit_auto_deref
changes - clippy: add paren before '?' when suggesting deref for
clone_on_copy
Rust Compiler Performance Triage
A pretty quiet week for performance. Unfortunately, by far the biggest change was a regression introduced by increasing the minimum libc version for linux-gnu targets. The exact reason for why this happened in this case is unclear, and it's not easy to investigate. Luckily, the average regression introduced by this change was 0.4% which is fairly small, and many of the larger regressions were limited to doc builds.
Triage done by @rylev. Revision range: 792bc5a0..cc4dd6fc
Summary:
mean | max | count | |
---|---|---|---|
Regressions ❌ (primary) |
0.5% | 1.4% | 146 |
Regressions ❌ (secondary) |
0.8% | 1.6% | 78 |
Improvements ✅ (primary) |
N/A | N/A | 0 |
Improvements ✅ (secondary) |
-2.0% | -4.0% | 9 |
All ❌✅ (primary) | 0.5% | 1.4% | 146 |
1 Regressions, 2 Improvements, 2 Mixed; 1 of them in rollups 42 artifact comparisons made in total
Full report here
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: merge] [RFC] Support
.comment
section like GCC/Clang (!llvm.ident
) - [disposition: merge] Tracking Issue for "unsafe blocks in unsafe fn" (RFC #2585)
New and Updated RFCs
Upcoming Events
Rusty Events between 2022-08-10 - 2022-09-07 🦀
Virtual
- 2022-08-10 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2022-08-10 | Virtual (Brasília, BR) | Turing Community + Turing Community LatAm
- 2022-08-10 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2022-08-10 | Virtual (Hoboken, NJ, US) | Neighborhood Math Club
- 2022-08-11 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-08-12 | Virtual + Tokyo, JP | tonari
- 2022-08-13 | Virtual | Rust Gamedev
- 2022-08-13 | Virtual (Bangalore, IN) | Polkadot India
- 2022-08-16 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2022-08-16 | Virtual (Granada, ES) | Google Developer Group Granada
- 2022-08-16 | Virtual (Washington, DC, US) | Rust DC
- 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-20 | Virtual (Hoboken, NJ, US) | Neighborhood Math Club
- 2022-08-24 | Virtual + Wellington, NZ | Rust Wellington
- 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-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 (Bangalore, IN) | Polkadot India
Asia
- 2022-08-12 | Tokyo, JP + Virtual | tonari
Europe
- 2022-08-30 | Utrecht, NL | Rust Nederland
North America
- 2022-08-10 | Atlanta, GA, US | Rust Atlanta
- 2022-08-11 | Columbus, OH, US| Columbus Rust Society
- 2022-08-16 | San Francisco, CA, US | San Francisco Rust Study Group
- 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
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
Don't come empty-handed to a project saying "this could be rewritten in Rust". It's obnoxious and gives the rust community a bad name.
Do start the project on your own, adding Rust to the build system and converting some significant functions, and then ask the project's community for comments.
Thanks to zjp-CN 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