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
Project/Tooling Updates
- Wasmtime Reaches 1.0: Fast, Safe and Production Ready!
- clap 4.0, a Rust CLI argument parser
- rust-analyzer changelog #147
- Announcing tauri-egui 0.1.0
Observations/Thoughts
- Aembit: Why We Chose Rust
- Ten challenges for Rust
- Futures Concurrency IV: Join Ergonomics
- Dyn async traits, part 8: the soul of Rust
- What I meant by the "soul of Rust"
- PostgresML is Moving to Rust for our 2.0 Release
- Bringing Up TLS on Precursor
- [video] curl-up 2022: hyper in curl
- [audio] Rust at Microsoft with Nell Shamrell-Harrington
- [audio] Axum with David Pedersen
Rust Walkthroughs
- Implementing the Display Trait on a Generic Array using Newtype Pattern
- A Strong Typing Example
- Rust Bevy Entity Component System
- [video] 1Password Developer Fireside Chat:
Serde Deserializers
- [video] Introduction to Async
Miscellaneous
Crate of the Week
This week's crate is match_deref, a macro crate to implement deref patterns on stable Rust.
Thanks to meithecatte 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.
- Ockam - Implement ockam status command
- Ockam - Make ockam identity show command work without creating nodes
- Ockam - Break down ockam command bats tests
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
347 pull requests were merged in the last week
- stabilize
let else
(RFC #3137) - stabilize generic associated types (RFC #1598)
- initial implementation of dyn*
- fix
#[link kind="raw-dylib"]
to respect#[link_name]
- disallow defaults on type GATs
- compute lint levels by definition
- deny return-position
impl Trait
in traits for object safety - do not suggest a placeholder to const and static without a type
- avoid infinite loop in function arguments checking
- fix ICE in
opt_suggest_box_span
- be careful about
expr_ty_adjusted
when noting block tail type - check that the types in return position
impl Trait
in traits are well-formed - impove diagnostic for
.await
ing non-futures - suggest pub instead of public for const type item
- suggest associated const for incorrect use of let in traits
- miri: implement a garbage collector for tags
- miri: make
sleep
work with isolation enabled - miri: run the GC more often on Linux, not MacOS
- do not fetch HIR node when iterating to find lint
- extend list of targets that support dyanmic linking for llvm tools
- normalize struct field types in
confirm_builtin_unsize_candidate
- streamline
register_res
rustc_error
,rustc_private
: switch to stable hash containers- change
AccessLevels
representation - change
FnMutDelegate
to trait objects - change rlib format to distinguish native dependencies
- ssa: implement
#[collapse_debuginfo]
- translations: migrate
rustc_session
to useSessionDiagnostic
- Final - constify
PartialEq
forOrdering
- constify impl Fn &(mut) Fn
- constify some
CStr
methods - use
DisplayBuffer
for socket addresses - simplify
const
memchr
- implement
std::marker::Tuple
- implement
simd_as
for pointers - stdarch: riscv: P extension intrinsics for packed SIMD (part 1)
- cargo: expose cargo add internals as edit API
- cargo: take priority into account within the pending queue
- rustdoc: use more precise URLs for jump-to-definition links
- clippy: Add
iter_kv_map
lint - clippy: Do not lint
use_self
in proc macro expansion - clippy: Don't lint
large_stack_array
inside static items - clippy: Don't panic on invalid shift while constfolding
- clippy: Fix
FormatArgsExpn
parsing ofFormatSpec
positions - clippy: Fix
almost_complete_letter_range
false positive - clippy: Fix
unused_peekable
closure andf(&mut peekable)
false positives - clippy: Make
derivable_impls
machine applicable - clippy: Make module-style lints resilient to
--remap-path-prefix
- clippy: Migrate write.rs to a late pass
- clippy: Use
visit_expr_field
forParamPosition
- clippy:
arithmetic-side-effects
More non-overflowing ops - clippy:
arithmetic-side-effects
Finish non-overflowing ops - clippy:
bool_to_int_with_if
inverse case patch - rust-analyzer: Add a new configuration settings to set env vars when running cargo, rustc, etc. commands: cargo.extraEnv and checkOnSave.extraEnv
- rust-analyzer: Add config to unconditionally prefer core imports over std
- rust-analyzer: Allow configuration of annotation location
- rust-analyzer: Complete variants and assoc items in path pattern through type aliases
- rust-analyzer: Ensure at least one trait bound in
TyKind::DynTy
- rust-analyzer: Filter imports on find-all-references
- rust-analyzer: Fix add reference action on macros
- rust-analyzer: Fix prelude injection
- rust-analyzer: Move reference imports filtering into
to_proto
layer - rust-analyzer: New assist:
move_format_string_arg
- rust-analyzer: Fix a crash
- rust-analyzer: handle lifetime variables in projection normalization
- rust-analyzer: handle trait methods as inherent methods for trait-related types
Rust Compiler Performance Triage
This was a fairly negative week for compiler performance, with regressions overall up to 14% on some workloads (primarily incr-unchanged scenarios), largely caused by #101620. We are still chasing down either a revert or a fix for that regression, though a partial mitigation in #101862 has been applied. Hopefully the full fix or revert will be part of the next triage report.
We also saw a number of other regressions land, though most were much smaller in magnitude.
Triage done by @simulacrum. Revision range: 17cbdfd0..8fd6d03
See the full report for more details.
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
- No Tracking Issues or PRs entered Final Comment Period this week.
New and Updated RFCs
Upcoming Events
Rusty Events between 2022-09-21 - 2022-10-19 🦀
Virtual
- 2022-09-21 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2022-09-22 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2022-09-22 | Virtual (Tehran, IR) | Iran Rust Meetup
- 2022-09-23 | Virtual (Tokyo, JP) | Rust Tokyo
- 2022-09-27 | Virtual (Berlin, DE) | Berlin.rs
- 2022-09-27 | Virtual (Dallas, TX, US) | Dallas Rust
- 2022-09-28 | Virtual (London, UK) | Rust London User Group
- 2022-09-30 | Virtual (Minneapolis, MN, US) | Minneapolis Rust Meetup
- 2022-10-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2022-10-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-10-05 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-10-06 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-10-08 | Virtual | Rust GameDev
- 2022-10-12 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2022-10-12 | Virtual (San Francisco, CA, US) | Microsoft Reactor San Francisco
- 2022-10-15 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-10-18 | Virtual (Washington, DC, US) | Rust DC
- 2022-10-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Asia
- 2022-09-24 | Beijing, CN | WebAssembly and Rust Meetup (Rustlang)
- 2022-10-11 | Tokyo, JP | Tokyo Rust Meetup
Europe
- 2022-09-27 | Nijmegen, NL | Rust Nederland
- 2022-09-28 | London, UK + Virtual | Rust London User Group
- 2022-09-29 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2022-09-29 | Copenhagen, DK | Copenhagen Rust group
- 2022-09-29 | Enschede, NL | Dutch Rust Meetup
- 2022-09-30 | Berlin, DE | RustFi Hackathon
- 2022-10-02 | Florence, IT + Virtual | RustLab
- 2022-10-03 | Stockholm, SE | Stockholm Rust
- 2022-10-12 | Berlin, DE | Rust Berlin
North America
- 2022-09-22 | Lehi, UT, US | Utah Rust
- 2022-09-28 | Austin, TX, US | Rust ATX
- 2022-09-29 | Ciudad de México, MX | Rust MX
- 2022-10-13 | Columbus, OH, US | Columbus Rust Society
- 2022-10-18 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2022-09-14 | Sydney, NSW, AU | Rust Sydney
- 2022-09-20 | Phillip, ACT, AU | Canberra Rust User Group
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
At the #LinuxPlumbers Rust MC: "I'm Matthew Wilcox, I'm one of the authors of the NVMe spec, I'm the one who suggested you make an NVMe driver to demonstrate the value of Rust. You have succeeded beyond my wildest expectations. These performance numbers are phenomenal."
– Josh Triplett paraphrasing Matthew Wilcox as spoken at the Linux Plumbers Conference Q&A session
Thanks to Josh Triplett for the self-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