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? Tag us at @thisweekinrust.bsky.social on Bluesky or @ThisWeekinRust on mastodon.social, or send us a pull request. Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub and archives can be viewed at this-week-in-rust.org. If you find any errors in this week's issue, please submit a PR.
Want TWIR in your inbox? Subscribe here.
Updates from Rust Community
Foundation
Project/Tooling Updates
Observations/Thoughts
- Two ways of interpreting visibility in Rust
- Does using Rust really make your software safer? - Blog - Tweede golf
- Body::poll_progress
- ratatui: are we embedded yet?
- Zig -> allocators -> Rust ergonomics
- Marching Events: What does iCalendar have to do with ray marching?
- [audio] Nushell with WindSoilder
- [audio] Microsoft with Victor Ciura
Rust Walkthroughs
- Implementation of Rust panics in the standard library
- How a GraphQL DataLoader works
- Implementing a GraphQL DataLoader the hard way
Crate of the Week
This week's crate is Maycoon, an experimental vello/wGPU-based UI framework.
Thanks to DraftedDev for the self-suggestion!
Please submit your suggestions and votes for next week!
Calls for Testing
An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization.
If you are a feature implementer and would like your RFC to appear in this list, add a
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.
- No calls for testing were issued this week by Rust, Rust language RFCs or Rustup.
Let us know if you would like your feature to be tracked as a part of this list.
RFCs
Rust
Rustup
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.
Call for Participation; projects and speakers
CFP - Projects
Always wanted to contribute to open-source projects but did not 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 or through a PR to TWiR or by reaching out on X (formerly Twitter) or Mastodon!
CFP - Events
Are you a new or experienced speaker looking for a place to share something cool? This section highlights events that are being planned and are accepting submissions to join their event as a speaker.
If you are an event organizer hoping to expand the reach of your event, please submit a link to the website through a PR to TWiR or by reaching out on X (formerly Twitter) or Mastodon!
Updates from the Rust Project
465 pull requests were merged in the last week
Compiler
- avoid overflow when generating debuginfo for expanding recursive types
- deref patterns: implement implicit deref patterns
- fix wrong "move keyword" suggestion for async gen block
- improve parse errors for stray lifetimes in type position
- make
#[naked]
an unsafe attribute - rewrite
on_unimplemented
format string parser
Miri
- miri: implement file deletion on Windows
- miri: use std-declared intrinsics rather than copying the declaration
Library
- add
next_index
to Enumerate - add retries to remove and create dir all
sync::mpsc
: prevent double free onDrop
- implement
Default
for raw pointers - implement
pin!()
usingsuper let
- stabilize
-Zdwarf-version
as-Cdwarf-version
- stabilize
cfg_boolean_literals
- stabilize
naked_functions
- simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors
- add
vec_extract
,vec_insert
,vec_promote
andvec_insert_and_zero
Cargo
Rustdoc
- fix error when an intra doc link is trying to resolve an empty associated item
- rustdoc-json: output target feature information
- support inlined cross-crate re-exported trait aliases
Clippy
- clippy:
bool_to_int_with_if
: properly handle macros - clippy:
empty_enum_variants_with_brackets
: Do not lint reachable enums andenum
variants used as functions in the same crate - clippy:
iter_kv_map
: recognize references on maps as well - clippy:
manual_ok_err
: don't lint subpatterns - clippy:
match_single_binding
: allow macros in scrutinee and patterns - clippy:
missing_asserts_for_indexing
: considerassert_eq!()
as well - clippy:
ptr_cast_constness
: show snippet from the right context - clippy: build complete usable type from a type-relative prefix
- clippy: check for lifetime uses in closures as well
- clippy: do not recurse forever in
significant_drop_tightening
- clippy: fix
question_mark
suggesting when type is behind Deref include parentheses - clippy: fix:
unnecessary_lazy_evaluations
suggests wrongly for async closure - clippy: make
borrow_as_ptr
flag implicit casts as well - clippy: new lint:
redundant_test_prefix
- clippy: new lint:
swap_with_temporary
- clippy: replace interning of string literals with preinterned symbols
Rust-Analyzer
- rust-analyzer: add semicolon to use
- rust-analyzer: allow training PGO on a custom crate and enable it Windows on CI
- rust-analyzer: allow using
null
to unset an environment variable - rust-analyzer: build aarch64 builds on CI with PGO
- rust-analyzer: don't ignore config values that fail to parse
- rust-analyzer: add
pub(crate) mod
option for unlinked files - rust-analyzer: allow unsetting env vars in
server.extraEnv
config - rust-analyzer: enhance signature help to display generic parameters for callables and default values for generic args
- rust-analyzer: parse
super let
- rust-analyzer: parse generic consts
- rust-analyzer:
Extract into
function include inline variable in fmt macro - rust-analyzer: fix
completion_snippets_custom
config always erroring - rust-analyzer: fix a bug with predicate lowering of associated items
- rust-analyzer: fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
- rust-analyzer: highlighting for tail expr in labelled blocks
- rust-analyzer: sort notable traits in hover
- rust-analyzer: support unstable
UnsafePinned struct
in type layout calc - rust-analyzer: use PGO on Linux x64 builds
- rust-analyzer: use PGO on macOS x64 and arm64 builds
Rust Compiler Performance Triage
Mostly positive week. Most of the improvements come from a revert of a regression from a few weeks ago, but we also get nice wins from re-using Sized fast-path, coming from Sized hierarchy implementation work.
Triage done by @panstromek. Revision range: 15f58c46..8f2819b0
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
1.3% | [0.4%, 2.1%] | 7 |
Regressions ❌ (secondary) |
- | - | 0 |
Improvements ✅ (primary) |
-1.0% | [-12.9%, -0.1%] | 144 |
Improvements ✅ (secondary) |
-2.2% | [-12.3%, -0.2%] | 111 |
All ❌✅ (primary) | -0.9% | [-12.9%, 2.1%] | 151 |
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.
Tracking Issues & PRs
Rust
- Stabilize
<[T; N]>::as_mut_slice
asconst
- Tracking Issue for
hint::select_unpredictable
- fix(test): Expose '--no-capture' in favor of
--nocapture
- stabilize ptr::swap_nonoverlapping in const
- Stabilize the avx512 target features
- Don't allow flattened format_args in const.
- lexer: Treat more floats with empty exponent as valid tokens
- Stabilize proc_macro::Span::{start,end,line,column}.
- check types of const param defaults
- Stabilize flags for doctest cross compilation
Other Areas
Cargo
Language Reference
No Items entered Final Comment Period this week for Rust RFCs, Language Team or Unsafe Code Guidelines.
Let us know if you would like your PRs, Tracking Issues or RFCs to be tracked as a part of this list.
New and Updated RFCs
- RFC: Disable niche layout optimization on enum discriminants
- RFC: Assume bounds for generic functions
- RFC: input macros
Upcoming Events
Rusty Events between 2025-04-23 - 2025-05-21 🦀
Virtual
- 2025-04-23 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2025-04-24 | Virtual (Berlin, DE) | Rust Berlin
- 2025-04-24 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2025-05-03 | Virtual (Kampala, UG) | Rust Circle Meetup
- 2025-05-05 | Virtual (Tel Aviv-Yafo, IL) | Rust 🦀 TLV
- 2025-05-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2025-05-07 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2025-05-08 | Virtual (Berlin, DE) | Rust Berlin
- 2025-05-13 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-05-15 | Virtual (Berlin, DE) | Rust Berlin
- 2025-05-20 | Virtual (Washington, DC, US) | Rust DC
- 2025-05-21 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Europe
- 2025-04-23 | London, UK | London Rust Project Group
- 2025-04-24 | Aarhus, DK | Rust Aarhus
- 2025-04-24 | Copenhagen, DK | Copenhagen Rust Community
- 2025-04-24 | Edinburgh, UK | Rust and Friends
- 2025-04-24 | Manchester, UK | Rust Manchester
- 2025-04-25 | Edinburgh, UK | Rust and Friends
- 2025-04-26 | Stockholm, SE | Stockholm Rust
- 2025-04-29 | London, UK | Rust London User Group
- 2025-04-29 | Paris, FR | Rust Paris
- 2025-04-30 | Frankfurt, DE | Rust Rhein-Main
- 2025-05-01 | Nürnberg, DE | Rust Nuremberg
- 2025-05-04 | Istanbul, TR | Türkiye Rust Community
- 2025-05-06 - 2025-05-07 | Paris, FR | WebAssembly and Rust Meetup
- 2025-05-06 | Paris, FR | WebAssembly and Rust Meetup (Wasm Empowering AI)
- 2025-05-07 | Madrid, ES | MadRust
- 2025-05-07 | Oxford, UK | Oxford Rust Meetup Group
- 2025-05-08 | Gdansk, PL | Rust Gdansk
- 2025-05-08 | London, UK | London Rust Project Group
- 2025-05-13 - 2025-05-17 | Utrecht, NL | Rust NL
- 2025-05-14 | Reading, UK | Reading Rust Workshop
- 2025-05-16 | Utrecht, NL | Rust NL Meetup Group
- 2025-05-20 | Aarhus, DK | Rust Aarhus
- 2025-05-20 | Leipzig, SN, DE | Rust - Modern Systems Programming in Leipzig
North America
- 2025-04-23 | Austin, TX, US | Rust ATX
- 2025-04-23 | Austin, TX, US | Rust ATX
- 2025-04-23 | Spokane, WA, US | Spokane Rust
- 2025-04-24 | Atlanta, GA, US | Rust Atlanta
- 2025-04-25 | Boston, MA, US | Boston Rust Meetup
- 2025-05-01 | Saint Louis, MO, US | STL Rust
- 2025-05-03 | Boston, MA, US | Boston Rust Meetup
- 2025-05-08 | México City, MX | Rust MX
- 2025-05-08 | Portland, OR, US | PDXRust
- 2025-05-11 | Boston, MA, US | Boston Rust Meetup
- 2025-05-15 | Nashville, TN, US | Music City Rust Developers
- 2025-05-15 | Redmond, WA, US | Seattle Rust User Group
- 2025-05-20 | San Francisco, CA, US | San Francisco Rust Study Group
South America
- 2025-05-28 | Montevideo, DE, UY | Rust Meetup Uruguay
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
I don’t think about rust either. That’s a compiler’s job
Thanks to Matt Wismer for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, U007D, joelmarcey, mariannegoldin, bennyvasquez, bdillo
Email list hosting is sponsored by The Rust Foundation