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 on X (formerly Twitter) 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
Official
Newsletters
Project/Tooling Updates
- Towards Practical Formal Verification for a General-Purpose OS in Rust
- Meilisearch 1.3 - AI-powered search stabilization, remote federated search, and dumpless version upgrades
- Slack Your REST Client with a couple of Serde Tricks
- Welcome, Cot: the Rust web framework for lazy developers
- derive-deftly 1.0.0 - Rust derive macros, the easy way
Observations/Thoughts
- Scaling PayPay with Rust (english / japanese)
- Macro-Less, Highly Integrated OpenAPI Document Generation in Rust with Ohkami
- Part 6b: The Types of Lowered Rows
- eserde: Don't stop at the first deserialization error
- Smuggling arbitrary data through an emoji
- Why I'm Writing a Scheme Implementation in 2025
- What's in a ring buffer? And using them in Rust
- How Rust & Embassy Shine on Embedded Devices (Part 1): Insights for Everyone and Nine Rules for Embedded Programmers
- Should I pin my Rust toolchain version?
Rust Walkthroughs
- Emjay – a simple JIT that does math
- ioctls from Rust
- A length-indexed Vector in Rust
- [video] Rust in Audio: Collections
Miscellaneous
- Rust’s Async Closures: A New Way to Handle Asynchronous Logic.
- Rust’s if/let While Chains: Cleaner Control Flow is Coming!.
- [video] Meet Elusion: New DataFrame Library for Python 🐍 users powered by Rust 🦀 with Borivoj Grujicic
Crate of the Week
This week's crate is httpmock, which is quite unsurprisingly a HTTP mocking library for Rust.
Thanks to Jacob Pratt for the 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. The following RFCs would benefit from user testing before moving forward:
RFCs
- No calls for testing were issued this week.
Rust
- No calls for testing were issued this week.
Rustup
- No calls for testing were issued 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.
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.
- NDC Techtown | 2025-04-27 | Kongsberg, Norway | 2025-09-22 to 2025-09-25
- Scientific Computing in Rust 2025 | Closes 2025-05-02 | virtual | Event date: 2025-06-04 to 2025-06-06
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
498 pull requests were merged in the last week
- make
-O
meanOptLevel::Aggressive
rustc_target
: Add the fp16 target feature for AArch32- add x86-sse2 (32bit) ABI that requires SSE2 target feature
- add cygwin target
- HIR analysis: Remove unnecessary abstraction over list of clauses
- AIX: expect
EINVAL
forpthread_mutex_destroy
abi_unsupported_vector_types
: say which type is the probleminvalid_from_utf8[_unchecked]
: also lint inherent methodstransmute
should also assume non-null pointers- allow configuring jemalloc per target
- cast allocas to default address space
- change
swap_nonoverlapping
from lang to library UB - check sig for errors before checking for unconstrained anonymous lifetime
- check whole
Unsize
predicate for escaping bound vars - compiler: die immediately instead of handling unknown target codegen
- compiler: give
ExternAbi
truly stableHash
andOrd
- compiler: replace
ExternAbi::name
calls with formatters - correctly escape hashtags when running
invalid_rust_codeblocks
lint - debuginfo: set bitwidth appropriately in
enum
variant tags - do not allow attributes on
struct
field rest patterns - eagerly prove WF when resolving fully qualified paths
- emit MIR for each bit with on
dont_reset_cast_kind_without_updating_operand
- explain that in paths generics can't be set on both the
enum
and the variant - fix
ensure_monomorphic_enough
- fix const items not being allowed to be called
r#move
orr#static
- fix diagnostic when using = instead of : in let binding
- fix presentation of purely "additive" replacement suggestion parts
- i686-linux-android: increase CPU baseline to Pentium 4 (without an actual change
- ignore Self in bounds check for associated types with Self:Sized
- implement
supertrait_item_shadowing
(v2) (RFC #3624) - implement pattern type ffi checks
- improve host/cross target checking
- in "specify type" suggestion, skip type params that are already known
- load all builtin targets at once instead of one by one in check-cfg
- made
check_argument_compat
public for use in miri - mark condition/carry bit as clobbered in C-SKY inline assembly
- normalize closure instance before eagerly monomorphizing it
- overhaul
rustc_middle::limits
- overhaul how contracts are lowered on fn-like bodies
- parallel-compiler-related cleanup
- properly deeply normalize in the next solver
- reject
?Trait
bounds in various places where we unconditionally warned since 1.0 - remove SSE ABI from i586-pc-windows-msvc
- remove the common prelude module
- replace some u64 hashes with Hash64
- resolve named regions when reporting type test failures in NLL
- rework
name_regions
to not rely on reverse scc graph for non-member-constrain usages - rework rigid alias handling
- set both
nuw
andnsw
in slice size calculation - show supported register classes in error message
- try to recover from path sep error in type parsing
- unify LLVM version finding logic
- use
const_error!
when possible - use a trait to enforce field validity for union fields +
unsafe
fields +unsafe<>
binder types - use the right binder for rebinding
PolyTraitRef
- valtree performance tuning
- miri: apply random float error
- miri: remove the build script for miri
- stabilize
NonZero::count_ones
- stabilize
const_is_char_boundary
andconst_str_split_at
- stabilize
get_many_mut
asget_disjoint_mut
- stabilize
target_feature_11
- std: replace the
FromInner
implementation for addresses with private conversion functions - implement
Extend<AsciiChar>
for String - implement
f
{16
,32
,64
,128
}::
{erf
,erfc
} under#![feature(float_erf)]
- implement
read*_exact
forstd:io::repeat
- use
slice::fill
inio::Repeat
implementation - use
tell
for<File as Seek>::stream_position
- restrict
DerefPure
forCow<T>
impl toT = impl Clone, [impl Clone], str
- forward all default methods for I/O impls
- cargo: embedded: Handle more parsing corner cases
- cargo: embedded: Integrate cargo-script logic into main parser
- cargo: implement workspace feature unification
- cargo: util: provide a better error message for invalid SSH URLs
- rustdoc: only apply LTO to rustdoc at stage 2
- rustdoc: Move line numbers into the
<code>
directly - rustdoc: improve refdef handling in the unresolved link lint
- rustdoc: properly restore search input placeholder
- rustdoc: Fixed
Copy Item Path
in rust doc - rustdoc: do more lazy formatting in librustdoc 🦥
- rustdoc: nuke
Buffer
abstraction fromlibrustdoc
, take 2 💣 - rustfmt: add option to control trailing zero in floating-point literals
- rustfmt: labels on the closure body block can be disappearing
- bindgen: distinguish
char16_t
- bindgen: report enums in ParseCallbacks
- clippy: new lint:
manual_contains
- clippy: new lint:
mem_replace_option_with_some
- clippy: new lint:
unbuffered_bytes
- clippy:
declare_interior_mutable_const
,borrow_interior_mutable_const
: resolve<T as Trait>::AssocT
projections - clippy:
doc_link_code
: add check for links with code spans that render weird - clippy:
just_underscores_and_digits
: fix false positive in error recovery scenario - clippy:
manual_ok_err
: blockify the replacement of anelse if …
- clippy:
unnecessary_map_or
: do not consume the comparison value if it does not implementCopy
- clippy:
{expect,unwrap}_used
: add options to lint at compilation time - clippy: add
--allow-no-vcs
tocargo dev dogfood --fix
- clippy: add index checks for the slice in
manual_slice_fill
- clippy: fix
literal_string_with_formatting_args
lint emitted when it should not - clippy: fix
used_underscore_items
lint uses of foreign functions - clippy: fix
needless_option_as_deref
FP in trait - rust-analyzer: add cargo's git checkouts to the list of paths to mark as read-only in vscode
- rust-analyzer: apply cfg.setTest to json projects
- rust-analyzer: feat: refactor path lowering and serve a new path diagnostic
- rust-analyzer: apply adjustments to proper expr when invoking
CoerceMany
- rust-analyzer: censor
cfg_attr
for attribute macros - rust-analyzer: do not show safety hints for extern items lacking semantics
- rust-analyzer: don't emit implicit drop inlay hints for macro
- rust-analyzer: don't show drop hints for other pattern
- rust-analyzer: fix detection of ref patterns for path patterns
- rust-analyzer: fix postfix completions inside macros
- rust-analyzer: fix sorting of runnables
- rust-analyzer: handle character boundary in search mode
- rust-analyzer: highlight
extern crate
in doc comments - rust-analyzer: improve sort order of runnables
- rust-analyzer: lower range pattern bounds to expressions
- rust-analyzer: make
rust-analyzer.files.excludeDirs
work, actually - rust-analyzer: propogate error types in mir type projections
- rust-analyzer: stabilize sort order of
related_tests
- rust-analyzer: implement
expand_glob_reexport
assist - rust-analyzer: improve error recovery when method-calling a field
- rust-analyzer: improve error recovery when method-calling an assoc function
- rust-analyzer: pass
struct
fields to chalk - rust-analyzer: simplify
panic_context
Rust Compiler Performance Triage
This week's results were dominated by the update to LLVM 20 (#135763),
which brought a large number of performance improvements, as usually. There were also two other
significant improvements, caused by improving the representation of const
values (#136593) and doing less work when formatting in rustdoc
(#136828).
Triage done by @kobzol.
Revision range: c03c38d5..ce36a966
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
4.4% | [0.2%, 35.8%] | 10 |
Regressions ❌ (secondary) |
1.2% | [0.2%, 5.0%] | 13 |
Improvements ✅ (primary) |
-1.6% | [-10.5%, -0.2%] | 256 |
Improvements ✅ (secondary) |
-1.0% | [-4.7%, -0.2%] | 163 |
All ❌✅ (primary) | -1.3% | [-10.5%, 35.8%] | 266 |
3 Regressions, 2 Improvements, 4 Mixed; 4 of them in rollups 50 artifact 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:
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
Rust
- Make
ptr_cast_add_auto_to_object lint
into hard error - Allow
*const W<dyn A> -> *const dyn A
ptr cast - Stabilize
core::str::from_utf8_mut
asconst
- core: Make
Debug
impl of raw pointers print metadata if present - Explain how Vec::with_capacity is faithful
- Reduce formatting
width
andprecision
to 16 bits - Run TLS destructors at process exit on all platforms
- Tracking Issue for
string_extend_from_within
- Tracking Issue for unbounded_shifts
- [discussion]
ErrorKind::InvalidFilename
from io_error_more
- Tracking Issue for
unsigned_is_multiple_of
- Tracking issue for HashMap::extract_if and HashSet::extract_if
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team Proposals entered Final Comment Period this week.
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guideline Tracking Issues or PRs entered Final Comment Period this week.
New and Updated RFCs
- Add
must-use-output
attribute - RFC: Deprecate the per-build-target
edition
field inCargo.toml
- RFC: Demote i686-pc-windows-gnu to Tier 2
Upcoming Events
Rusty Events between 2025-02-19 - 2025-03-19 🦀
Virtual
- 2025-02-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2025-02-20 | Hybrid (Redmond, WA, US) | Seattle Rust User Group
- 2025-02-21 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-02-25 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-02-25 | Virtual (London, UK) | Women in Rust
- 2025-02-25 | Virtual (Washington, DC, US) | Rust DC
- 2025-02-27 | Virtual (US) | Ardan Labs
- 2025-02-27 | Virtual (Berlin, DE) | Rust Berlin
- 2025-02-27 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2025-03-01 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2025-03-04 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-03-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2025-03-06 | Virtual (Nürnberg, DE) | Rust Nurnberg DE
- 2025-03-06 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2025-03-06 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-03-09 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-03-11 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-03-11 | Virtual (London, UK) | Women in Rust
- 2025-03-13 | Virtual (Berlin, DE) | Rust Berlin
- 2025-03-18 | Virtual (Washington, DC, US) | Rust DC
- 2025-03-18 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-03-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Asia
- 2025-02-24 | Tel Aviv-Yafo, IL | Rust 🦀 TLV
- 2025-03-01 | Bangalore/Bengaluru, IN | Rust Bangalore
- 2025-03-19 | Tel Aviv-Yafo, IL | Rust 🦀 TLV
Europe
- 2025-02-19 - 2025-02-20 | London, UK | Rust Nation UK
- 2025-02-20 | Bern, CH | Rust Bern
- 2025-02-21 | London, UK | Rust Global: London 2025
- 2025-02-22 | Stockholm, SE | Stockholm Rust
- 2025-02-25 | Madrid, ES | MadRust
- 2025-02-26 | Darmstadt, DE | Rust Rhein Main
- Rust Compiler Tuning 2025-02-26 | Girona, ES | Rust Girona
- Rust Girona Hack & Learn 03 2025
- 2025-02-27 | Oslo, NO | Rust Oslo
- 2025-02-27 | Paris, FR | Rust Paris
- 2025-03-01 | Nürnberg, DE | Rust Nuremberg
- 2025-03-05 | Barcelona, ES | BcnRust
- 2025-03-07 | Prague, CZ | Rust Czech Republic
- 2025-03-12 | Reading, UK | Reading Rust Workshop
- 2025-03-12 | Reading, UK | Reading Rust Workshop
- 2025-03-13 | Biel, CH | Rust Bern
- 2025-03-14 | Paris, FR | Rust in Paris
- 2025-03-18 | Basel, CH | Rust Basel
- 2025-03-18 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
North America
- 2025-02-20 | Chicago, IL, US | Chicago Rust Meetup
- 2025-02-20 | Nashville, TN, US | Music City Rust Developers
- 2025-02-20 | Redmond, WA, US | Seattle Rust User Group
- 2025-02-20 | Spokane, WA, US | Spokane Rust
- 2025-02-21 | México City, MX | Rust MX
- 2025-02-22 | Boston, MA, US | Boston Rust Meetup
- 2025-02-26 | Austin, TX, US | Rust ATX
- 2025-02-27 | Atlanta, GA, US | Rust Atlanta
- 2025-03-02 | Boston, MA, US | Boston Rust Meetup
- 2025-03-06 | Saint Louis, MO, US | STL Rust
- 2025-03-10 | Boston, MA, US | Boston Rust Meetup
- 2025-03-18 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2025-02-24 | Collingwood, VI, AU | Rust Melbourne
- 2025-02-25 | Barton, AC, AU | Canberra Rust User Group
- 2025-02-27 | Auckland, NZ | Rust AKL
- 2025-03-04 | Perth, WA, AU | Rust Perth Meetup Group
- 2025-03-11 | Christchurch, NZ | Christchurch Rust Meetup Group
South America:
- 2025-03-15 | São Paulo, BR | Rust São Paulo 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.
Jobs
Please see the latest Who's Hiring thread on r/rust
Quote of the Week
I have found that many automated code review tools, including LLMs, catch 10 out of 3 bugs.
Despite a lamentable lack of suggestions, llogiq is properly pleased with his choice.
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