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
Foundation
Newsletters
Project/Tooling Updates
- Fyrox Game Engine 0.36
- Refined: simple refinement types for Rust
- Maintainer opinions on Rust-for-Linux
- Rewriting essential Linux packages in Rust
- Nutype 0.6.0 - newtype with guarantees supports const functions now
- Glues v0.6.0 – TUI Note-Taking App with a major design refresh
- Gladius 0.2 released - a GPLv3, command line, multicursor code editor with LSP support
Observations/Thoughts
- A survey of every iterator variant
- Updating a large codebase to Rust 2024
- How I learned to stop worrying and love the LLM
- The Three Basic Rules of Safety Hygiene
- [video] Bevy Meetup#1 - Alice - What the f*** is reflection?
- [video] The case for sans-io
Rust Walkthroughs
- First Steps in Game Development With Rust and Bevy
- Provisioning TLS Certificates in Rust With ACME
- Tip of the day #4: Type annotations on Rust match patterns
- From hours to 360ms: over-engineering a puzzle solution
- Writing a Simple Driver in Rust
- Solving the ABA Problem in Rust with Tagged Pointers
- Mix in Rust with Java (or Kotlin!)
- How to write DRY code in Rust
FOSDEM
- Rust for Linux
- Rewriting the future of the Linux essential packages in Rust ?
- Writing a kubernetes controller… But in Rust
- Using embedded Rust to build an unattended, battery-powered device
- Augurs: a time series toolkit for Rust
- Building a watt-meter esp-rs and a rocket backend
- Huge graph analysis on your own server with WebGraph in Rust
- Bringing terminal aesthetics to the Web with Rust (and vice versa)
- Abusing reborrowing for fun, profit, and a safepoint garbage collector
- Lessons from rewriting systems software in Rust
- Rust-ifying the Linux kernel scheduler (in user space)
- Adventures in oxidizing Arch Linux Package Management
- Modeling Inheritance in SeaORM
Miscellaneous
Crate of the Week
This week's crate is esp32-mender-client, a client for ESP32 to execute firmware updates and remote commands.
Thanks to Kelvin 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. 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.
No Calls for participation were submitted this week.
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.
No Calls for papers or presentations were submitted this week.
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
462 pull requests were merged in the last week
- add amdgpu target
#[contracts::requires(...)]+#[contracts::ensures(...)]rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync"- add note about
FnPtrtrait being exposed as public bound - allow using named consts in pattern types
- always compute coroutine layout for eagerly emitting recursive layout errors
- avoid calling the
layout_ofquery inlit_to_const - avoid using
make_direct_deprecated()in extern "ptx-kernel" - check Sizedness of return type in WF
- compiler: gate
extern "{abi}"inast_lowering - couple of changes to run rustc in miri
- coverage: defer part of counter-creation until codegen
- debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit
- detect (non-raw) borrows of null ZST pointers in CheckNull
- disallow
repr()on invalid items - display of integers without raw pointers and without
overflowing_literals - don't reset cast kind without also updating the operand in
simplify_castin GVN - emit an error if
-Zdwarf-version=1is requested - ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types
- fix
rustc_hidden_type_of_opaquesfor RPITITs with no default body - fix
unreachable_publint for hermit target - fix accidentally not emitting overflowing literals lints anymore in patterns
- fix suggestion for
dependency_on_unit_never_type_fallbackinvolving closures + format args expansions - fix tail call checks wrt
#[track_caller] - fix unwrap error in overflowing int literal
- fuchsia: allow Rust to use a number of libc filesystem calls
- generate correct terminate block under Wasm EH
- introduce CoercePointeeValidated for coherence checks at typeck stage
- label mismatched parameters at the def site for foreign functions
- make
AsyncFnOnce,AsyncFnMut,AsyncFnnon-#[fundamental] - make
cenum_impl_drop_casta hard error - make sure to use
Receivertrait when extracting object method candidate - only highlight unmatchable parameters at the definition site
- pass spans around new solver
- pattern Migration 2024: try to suggest eliding redundant binding modifiers
- pick the max DWARF version when LTO'ing modules with different versions
- ping me for attribute-related changes
- reject negative literals for unsigned or char types in pattern ranges and literals
- removed dependency on the field-offset crate, alternate approach
- report generic mismatches when calling bodyless trait functions
- resolve
llvm-configpath properly on cross builds - show diff suggestion format on verbose replacement
- some
rustc_middlecleanups - some miscellaneous edition-related library tweaks
- transmutability: fix ICE when passing wrong ADT to ASSUME
- uefi: process: add support for command environment variables
- upgrade elsa to the newest version
- use +secure-plt for powerpc-unknown-linux-gnu{,spe}
- use
widening_mulinstead of a separate function - use an
OptionforFindNextFileHandleinReadDirinstead ofINVALID_FILE_HANDLEsentinel value - use short ty string for binop and unop errors
- visit all debug info in MIR Visitor
- shard AllocMap Lock
- miri: allow code to call
geteuid() - miri: throw ub error when invoking non-vararg shim with vararg import
- miri: use fcntl locking on Solaris instead of flock which is missing there
- implement
eat_untilleveraging memchr in lexer - stabilise
Cursor::{get_mut, set_position}inconstscenarios - stabilize
feature(trait_upcasting) - stabilize
map_many_mutfeature - stabilize
vec_pop_if - add
unchecked_disjoint_bitorper ACP373 - add
UnsafeCelldirect access APIs - implement unstable
new_rangefeature - implement inherent str constructors
- add
cast_signedandcast_unsignedmethods forNonZerotypes - mark
std::fmt::from_fnas#[must_use] - std: move network code into
sys - std::fs: further simplify dirent64 handling
- optimize
Rc::<str>::default()implementation - rename
slice::take...methods tosplit_off... - windows: remove readonly files
- cargo: don't use on Solaris
libc::LOCK_*which were removed from libc in ver… - cargo: feat: add
cargo pkgidsupport for cargo-script - cargo: feat: emit error if package not found within workspace
- cargo: fix changelog link
- cargo: fix race condition in
panic_abort_tests - cargo: fix: align first line of unordered list with following
- cargo: fix: don't use "did you mean" in errors
- cargo: make cache tracking resilient to unexpected files
- cargo: simplify backtrack
- cargo: small resolver cleanups
- cargo: suggest similar feature names on CLI
- rustdoc: use ThinVec for generic arg parts
- enable "jump to def" feature on rustc docs
- rustfmt:
check_difffunction rewrite - clippy: add
single_option_maplint - clippy:
path_buf_push_overwrite: mark suggestion asMaybeIncorrect - clippy:
useless_asref: no lint if in a closure to change the ref depth - clippy: add MSRV check for
lines_filter_map_ok - clippy: add MSRV check for
manual_flatten - clippy: allow
assign_op_patternin the test ofstring_add - clippy: autofix for
range_zip_with_len - clippy: change the applicability of
if_then_some_else_nonetoMachineApplicable - clippy: correct "Affected lints" for
allow-one-hash-in-raw-strings - clippy: correct version of
doc_overindented_list_items - clippy: deprecate redundant lint
option_map_or_err_okand takemanual_ok_orout of pedantic - clippy: do not trigger
[size_of_in_element_count]foru8 - clippy: don't emit suggestion inside macro in
manual_async_fn - clippy: don't use labeled block as top-level blocks
- clippy: fix ICE in
unnecessary_mut_passed - clippy: fix
let_and_returnwith temporary variables, and distinguish between Rust editions - clippy: fix
obfuscated_if_elsesuggestion on left side of a binary expr - clippy: fix docs for
#[clippy::format_args] - clippy: fix:
manual_unwrap_or_defaultsuggests falsely when condition type is uncertain - clippy: handle more cases in
is_normalizable - clippy: make empty-line-after an early clippy lint
- clippy: make
manual_mapignore types that containdyn - clippy: move
mutex_integerto restriction and improvemutex_{integer,atomic} docs - clippy: skip
use_selfinside macro expansions of aimpl Selfblock - clippy: two improvements to
disallowed_* - clippy: use MIR body to identify more "default equivalent" calls for
derivable_impls - clippy: use parentheses when needed in
nonminimal_boollint - rust-analyzer: fix off-by-one error in RangeFormatting
- rust-analyzer: don't emit empty scip occurrence for builtins
- rust-analyzer: fix IDE resolution of
useinside a body - rust-analyzer: if item exsits on module, resolve as module instead of type
- rust-analyzer: resolve projection types before checking casts
- rust-analyzer: upmap ranges in
convert_tuple_struct_to_named_structassist - rust-analyzer: line-index: don't try to use (unavailable) neon on big-endian aarch64
- rust-analyzer: option to disable inlay Type hints for Closure parameters
- rust-analyzer: organise chapters in mdbook sidebar
- rust-analyzer: prevent panics from tearing down worker threads
- rust-analyzer: split cache priming into distinct phases
- rust-analyzer: use interior mutability for loaded
ProcMacrorv::expanders
Rust Compiler Performance Triage
A relatively neutral week, with lots of real changes but most small in magnitude. Most significant change is rustdoc's move of JS/CSS minification to build time which cut doc generation times on most benchmarks fairly significantly.
Triage done by @simulacrum. Revision range: 01e4f19c..c03c38d5
3 Regressions, 5 Improvements, 1 Mixed; 2 of them in rollups 32 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:
- 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
Tracking Issues & PRs
Rust
- Stabilize
num_midpoint_signedfeature - Do not deduplicate list of associated types provided by dyn principal
- regression: a value of type
HashMap<Pulse, u64>cannot be built from - Tracking Issue for
inherent_str_constructors - Tracking Issue for
os_str_display - Do not allow attributes on struct field rest patterns
- feat(core): impl Step for NonZero < u* >
- Future incompatibility warning
unsupported_fn_ptr_calling_conventions: Also warn in dependencies - Make Miri aware of leaks of
Box/Vec/String - Tracking Issue for
integer_sign_cast
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
Upcoming Events
Rusty Events between 2025-02-12 - 2025-03-12 🦀
Virtual
- 2025-02-12 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2025-02-13 | Virtual (Berlin, DE) | Rust Berlin
- 2025-02-14 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 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-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-11 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-03-11 | Virtual (London, UK) | Women in Rust
Asia
- 2025-02-24 | Tel Aviv-Yafo, IL | Rust 🦀 TLV
- 2025-03-01 | Bangalore/Bengaluru, IN | Rust Bangalore
Europe
- 2025-02-12 | Reading, UK | Reading Rust Workshop
- 2025-02-14 | Edinburgh, UK | Rust and Friends
- 2025-02-18 | Leipzig, SN, DE | Rust - Modern Systems Programming in Leipzig
- 2025-02-18 | London, UK | Rust London User Group
- 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
- 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-12 | Reading, UK | Reading Rust Workshop
North America
- 2025-02-13 | Portland, OR, US | PDXRust
- 2025-02-14 | Boston, MA, US | Boston Rust Meetup
- 2025-02-18 | San Francisco, CA, US | San Francisco Rust Study Group
- 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-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
Oceania
- 2025-02-24 | Collingwood, VI, AU | Rust Melbourne
- 2025-02-25 | Barton, AC, AU | Canberra Rust User Group
- 2025-03-04 | Perth, WA, AU | Rust Perth Meetup 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
Just because things are useful doesn't mean they are magically sound.
Thanks to scottmcm 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