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
- cargo.nvim - A Neovim plugin for Rust's Cargo commands
- Context-Generic Programming Updates: v0.3.0 Release and New Chapters
- The RTen machine learning runtime - a 2024 retrospective
Observations/Thoughts
- The gen auto-trait problem
- Async Rust is about concurrency, not (just) performance
- The Emotional Appeal of Rust
- [audio] Brave with Anton Lazarev
- [audio] Lychee with Matthias Endler
Rust Walkthroughs
- Creating an embedded device driver in Rust
- Const Evaluation in Rust For Hex Strings Validation
- Concurrent and parallel future execution in Rust
- [video] Intro to Embassy: embedded development with async Rust
- [video] Comprehending Proc Macros
- [video] CppCon - C++/Rust Interop: Using Bridges in Practice
Miscellaneous
- December 2024 Rust Jobs Report
- Tracing Large Memory Allocations in Rust with BPFtrace
- On LLMs and Code Optimization
- Nand2Tetris - Project 7 (VM Translator Part 1)
Crate of the Week
This week's crate is vidyut, a Sanskrit toolkit containing functionality about meter, segmentation, inflections, etc.
Thanks to Arun Prasad 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
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.
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.
- rama - see if improvements can/have-to be made to rama's http open telemetry layer support
- rama – add rama to TechEmpower's FrameworkBenchmark
- rama – add rama server benchmark to sharkbench
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.
- Rust Week (Rust NL) | Closes on 2025-01-19 | Utrecht, NL | Event on 2025-05-13 & 2025-05-14
- Rust Summit | Rolling deadline | Belgrade, RS | Event on 2025-06-07
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
469 pull requests were merged in the last week
- add new
{x86_64,i686}-win7-windows-gnu
targets - arm: add unstable soft-float target feature
-Zrandomize-layout
harder.Foo<T> != Foo<U>
best_blame_constraint
: Blame better constraints when the region graph has cycles from invariance or'static
mir_transform
: implement#[rustc_force_inline]
run_make_support
: add#![warn(unreachable_pub)]
- account for identity substituted items in symbol mangling
- add
-Zmin-function-alignment
- add
default_field_values
entry to unstable book - add a list of symbols for stable standard library crates
- add an
InstSimplify
for repetitive array expressions - add inherent versions of
MaybeUninit
methods for slices - add missing provenance APIs on
NonNull
- assert that
Instance::try_resolve
is only used on body-like things - avoid ICE: Account for
for<'a>
types when checking for non-structural type in constant as pattern - avoid replacing the definition of
CURRENT_RUSTC_VERSION
- cleanup
suggest_binding_for_closure_capture_self
diag in borrowck - condvar: implement
wait_timeout
for targets without threads - convert typeck constraints in location-sensitive polonius
- depth limit const eval query
- detect
mut arg: &Ty
meant to bearg: &mut Ty
and provide structured suggestion - do not ICE when encountering predicates from other items in method error reporting
- eagerly collect mono items for non-generic closures
- ensure that we don't try to access fields on a non-struct pattern type
- exhaustively handle expressions in patterns
- fix ICE with references to infinite structs in consts
- fix cycle error only occurring with -Zdump-mir
- fix handling of ZST in win64 ABI on windows-msvc targets
- implement
const Destruct
in old solver - lower Guard Patterns to HIR
- make (unstable API)
UniqueRc
invariant for soundness - make MIR cleanup for functions with impossible predicates into a real MIR pass
- make
lit_to_mir_constant
andlit_to_const
infallible - normalize each signature input/output in
typeck_with_fallback
with its own span - remove a bunch of diagnostic stashing that doesn't do anything
- remove allocations from case-insensitive comparison to keywords
- remove special-casing for argument patterns in MIR typeck (attempt to fix perf regression of #133858)
- reserve x18 register for aarch64 wrs vxworks target
- rm unnecessary
OpaqueTypeDecl
wrapper - suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions
- support target specific
optimized-compiler-builtins
- unify conditional-const error reporting with non-const error reporting
- use a post-monomorphization typing env when mangling components that come from impls
- use llvm.memset.p0i8.* to initialize all same-bytes arrays
- used pthread name functions returning result for FreeBSD and DragonFly
- warn about broken simd not only on structs but also enums and unions when we didn't opt in to it
- implement trait upcasting
- mir-opt: GVN some more transmute cases
- miri: add FreeBSD maintainer; test all of Solarish
- miri: added Android to
epoll
andeventfd
test targets - miri: adjust the way we build miri-script in RA, to fix proc-macros
- miri: illumos: added epoll and eventfd
- miri: supported fioclex for ioctl on macos
- miri: switched FreeBSD to
pthread_setname_np
- miri: use
deref_poiner_as
instead ofderef_pointer
proc_macro
: UseToTokens
trait inquote
macro- add
#[inline]
tocopy_from_slice
- impl
String::into_chars
- initial fs module for uefi
- hashbrown: added Allocator template argument for
rustc_iter
- account for optimization levels other than numbers
- cargo: schemas: Fix 'metadata' JSON Schema
- cargo: schemas: Fix the
[lints]
JSON Schema - cargo: perf: cargo-package: match certain path prefix with pathspec
- cargo: fix: emit warnings as warnings when learning rust target info
- cargo: make
"C"
explicit inextern "C"
- cargo: setup cargo environment for
cargo rustc --print
- cargo: simplify SourceID Ord/Eq
- rustdoc-json: include items in stripped modules in
Crate::paths
- rustdoc: use import stability marker in display
- rustdoc: use stable paths as preferred canonical paths
- rustfmt: drop nightly-gating of the
--style-edition
flag registration - clippy: add new lint
unneeded_struct_pattern
- clippy: auto-fix
slow_vector_initialization
in some cases - clippy: do not intersect spans coming from different contexts
- clippy: do not look for significant drop inside
.await
expansion - clippy: do not propose to elide lifetimes if this causes an ambiguity
- clippy: do not remove identity mapping if mandatory mutability would be lost
- clippy: do not trigger
redundant_pub_crate
in external macros - clippy: don't emit machine applicable
map_flatten
lint if there are code comments - clippy: don't suggest to use
cloned
forCow
inunnecessary_to_owned
- clippy: fix type suggestion for
manual_is_ascii_check
- clippy: improve
needless_as_bytes
to also detectstr::bytes()
- clippy: new lint:
manual_ok_err
- clippy: remove unneeded parentheses in
unnecessary_map_or
lint output - rust-analyzer: add a new and improved syntax tree view
- rust-analyzer: add config setting which allows adding additional include paths to the VFS
- rust-analyzer: re-implement rust string highlighting via tool attribute
- rust-analyzer: fix JSON project
PackageRoot
buildfile inclusion - rust-analyzer: do not compute
prettify_macro_expansion()
unless the "Inline macro" assist has actually been invoked - rust-analyzer: do not offer completions within macro strings
- rust-analyzer: fix
env
/option_env
macro check disregardingmacro_rules
definitions - rust-analyzer: fix
ref
text edit for binding mode hints - rust-analyzer: fix a bug with missing binding in MBE
- rust-analyzer: fix actual token lookup in completion's
expand()
- rust-analyzer: fix another issue with fixup reversing
- rust-analyzer: fix diagnostics not clearing between flychecks
- rust-analyzer: make edition per-token, not per-file
- rust-analyzer: implement
#[rust_analyzer::skip]
for bodies - rust-analyzer: implement implicit sized bound inlay hints
- rust-analyzer: improve hover module path rendering
Rust Compiler Performance Triage
A quiet week with little change to the actual compiler performance. The biggest compiler regression was quickly recognized and reverted.
Triage done by @rylev. Revision range: 0f1e965f..1ab85fbd
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.4% | [0.1%, 1.8%] | 21 |
Regressions ❌ (secondary) |
0.5% | [0.0%, 2.0%] | 35 |
Improvements ✅ (primary) |
-0.8% | [-2.7%, -0.3%] | 6 |
Improvements ✅ (secondary) |
-10.2% | [-27.8%, -0.1%] | 13 |
All ❌✅ (primary) | 0.2% | [-2.7%, 1.8%] | 27 |
4 Regressions, 3 Improvements, 3 Mixed; 3 of them in rollups 44 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
- remove support for the (unstable) #[start] attribute
- fully de-stabilize all custom inner attributes
- Uplift
clippy::double_neg
lint asdouble_negations
- Optimize
Seek::stream
_len impl for File - [rustdoc] Add sans-serif font setting
- Tracking Issue for PathBuf::add_extension and Path::with_added_extension
- Make the wasm_c_abi future compat warning a hard error
- const-eval: detect more pointers as definitely not-null
- Consider fields to be inhabited if they are unstable
- disallow repr() on invalid items
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
Unsafe Code Guidelines
- No Unsafe Code Guideline Tracking Issues or PRs entered Final Comment Period this week.
New and Updated RFCs
- Make trait methods callable in const contexts
- RFC: Allow packages to specify a set of supported targets
Upcoming Events
Rusty Events between 2025-01-15 - 2025-02-12 🦀
Virtual
- 2025-01-15 | Virtual (London, UK) | London Rust Project Group
- 2025-01-15 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-01-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2025-01-16 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2025-01-16 | Virtual (San Diego, CA, US) | San Diego Rust
- 2025-01-16 | Virtual and In-Person (Redmond, WA, US) | Seattle Rust User Group
- 2025-01-17 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-01-21 | Virtual (London, UK) | Women in Rust
- 2025-01-21 | Virtual (Tel Aviv-Yafo, IL) | Rust 🦀 TLV
- 2025-01-21 | Virtual (Washington, DC, US) | Rust DC
- 2025-01-22 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2025-01-23 & 2025-01-24 | Virtual | Mainmatter Rust Workshop
- 2025-01-24 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-01-26 | Virtual (Tel Aviv-Yafo, IL) | Rust 🦀 TLV
- 2025-01-27 | Virtual (London, UK) | London Rust Project Group
- 2025-01-28 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-01-30 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2025-01-30 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2025-01-30 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-01-31 | Virtual (Delhi, IN) | Hackathon Raptors Association
- 2025-01-31 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-02-01 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2025-02-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2025-02-04 | Virtual (London, UK) | Women in Rust
- 2025-02-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2025-02-07 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-02-11 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-02-11 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
Europe
- 2025-01-16 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2025-01-16 | Karlsruhe, DE | Rust Hack & Learn Karlsruhe
- 2025-01-18 | Stockholm, SE | Stockholm Rust
- 2025-01-21 | Edinburgh, GB | Rust and Friends
- 2025-01-21 | Ghent, BE | Systems Programming Ghent
- 2025-01-21 | Leipzig, SN, DE | Rust - Modern Systems Programming in Leipzig
- 2025-01-22 | London, GB | Rust London User Group
- 2025-01-22 | Oberursel, DE | Rust Rhein Main
- 2025-01-23 | Barcelona, ES | Barcelona Free Software
- 2025-01-23 | Paris, FR | Rust Paris
- 2025-01-24 | Edinburgh, GB | Rust and Friends
- 2025-01-27 | Prague, CZ | Rust Prague
- 2025-01-28 | Aarhus, DK | Rust Aarhus
- 2025-01-28 | Manchester, GB | Rust Manchester
- 2025-01-30 | Augsburg, DE | Rust Meetup Augsburg
- 2025-01-30 | Berlin, DE | Rust Berlin
- 2025-02-01 | Brussels, BE | FOSDEM 2025
- 2025-02-01 | Nürnberg, DE | Rust Nuremberg
- 2025-02-05 | Oxford, GB | Oxford Rust Meetup Group
- 2025-02-12 | Reading, GB | Reading Rust Workshop
North America
- 2025-01-16 | Nashville, TN, US | Music City Rust Developers
- 2025-01-16 | Redmond, WA, US | Seattle Rust User Group
- 2025-01-16 | Spokane, WA, US | Spokane Rust
- 2025-01-17 | México City, MX | Rust MX
- 2025-01-18 | Boston, MA, US | Boston Rust Meetup
- 2025-01-21 | New York, NY, US | Rust NYC
- 2025-01-21 | San Francisco, CA, US | San Francisco Rust Study Group
- 2025-01-22 | Austin, TX, US | Rust ATX
- 2025-01-23 | Mountain View, CA, US | Hacker Dojo
- 2025-01-28 | Boulder, CO, US | Boulder Rust Meetup
- 2025-02-06 | Saint Louis, MO, US | STL Rust
Oceania:
- 2025-02-04 | Auckland, NZ | Rust AKL
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
This is a wonderful unsoundness and I am incredibly excited about it :3
Thanks to Christoph Grenz 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