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
- October project goals update
- Next Steps on the Rust Trademark Policy
- This Development-cycle in Cargo: 1.83
- Re-organising the compiler team and recognising our team members
- This Month in Our Test Infra: October 2024
- Call for proposals: Rust 2025h1 project goals
Foundation
- Q3 2024 Recap from Rebecca Rumbul
- Rust Foundation Member Announcement: CodeDay, OpenSource Science(OS-Sci), & PROMOTIC
Newsletters
Project/Tooling Updates
- Announcing Intentrace, an alternative strace for everyone
- Ractor Quickstart
- Announcing Sycamore v0.9.0
- CXX-Qt 0.7 Release
- An 'Educational' Platformer for Kids to Learn Math and Reading—and Bevy for the Devs
- [ZH][EN] Select HTML Components in Declarative Rust
Observations/Thoughts
- Safety in an unsafe world
- MinPin: yet another pin proposal
- Reached the recursion limit... at build time?
- Building Trustworthy Software: The Power of Testing in Rust
- Async Rust is not safe with io_uring
- Macros, Safety, and SOA
- how big is your future?
- A comparison of Rust’s borrow checker to the one in C#
- Streaming Audio APIs in Rust pt. 3: Audio Decoding
- [audio] InfinyOn with Deb Roy Chowdhury
Rust Walkthroughs
- Difference Between iter() and into_iter() in Rust
- Rust's Sneaky Deadlock With
if let
Blocks - Why I love Rust for tokenising and parsing
- "German string" optimizations in Spellbook
- Rust's Most Subtle Syntax
- Parsing arguments in Rust with no dependencies
- Simple way to make i18n support in Rust with with examples and tests
- How to shallow clone a Cow
- Beginner Rust ESP32 development - Snake
- [video] Rust Collections & Iterators Demystified 🪄
Research
Miscellaneous
- Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
- [audio] Let's talk about Rust with John Arundel
- [audio] Exploring Rust for Embedded Systems with Philip Markgraf
Crate of the Week
This week's crate is wtransport, an implementation of the WebTransport specification, a successor to WebSockets with many additional features.
Thanks to Josh Triplett 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.
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
473 pull requests were merged in the last week
- account for late-bound depth when capturing all opaque lifetimes
- add
--print host-tuple
to print host target tuple - add
f16
andf128
toinvalid_nan_comparison
- add
lp64e
RISC-V ABI - also treat
impl
definition parent as transparent regarding modules - cleanup attributes around unchecked shifts and unchecked negation in const
- cleanup op lookup in HIR typeck
- collect item bounds for RPITITs from trait where clauses just like associated types
- do not enforce
~const
constness effects in typeck ifrustc_do_not_const_check
- don't lint
irrefutable_let_patterns
on leading patterns ifelse if
let-chains - double-check conditional constness in MIR
- ensure that resume arg outlives region bound for coroutines
- find the generic container rather than simply looking up for the assoc with const arg
- fix compiler panic with a large number of threads
- fix suggestion for diagnostic error E0027
- fix validation when lowering
?
trait bounds - implement suggestion for never type fallback lints
- improve
missing_abi
lint - improve duplicate derive Copy/Clone diagnostics
- llvm: match new LLVM 128-bit integer alignment on sparc
- make codegen help output more consistent
- make sure
type_param_predicates
resolves correctly for RPITIT - pass
RUSTC_HOST_FLAGS
at once without the for loop - port most of
--print=target-cpus
to Rust - register
~const
preds forDeref
adjustments in HIR typeck - reject generic self types
- remap impl-trait lifetimes on HIR instead of AST lowering
- remove
""
case from RISC-Vllvm_abiname
match statement - remove
do_not_const_check
fromIterator
methods - remove region from adjustments
- remove support for
-Zprofile
(gcov-style coverage instrumentation) - replace manual time convertions with std ones, comptime time format parsing
- suggest creating unary tuples when types don't match a trait
- support
clobber_abi
and vector registers (clobber-only) in PowerPC inline assembly - try to point out when edition 2024 lifetime capture rules cause borrowck issues
- typingMode: merge intercrate, reveal, and
defining_opaque_types
- miri: change
futex_wait
errno from Scalar to IoError - stabilize
const_arguments_as_str
- stabilize
if_let_rescope
- mark
str::is_char_boundary
andstr::split_at*
unstablyconst
- remove const-support for
align_offset
andis_aligned
- unstably add
ptr::byte_sub_ptr
- implement
From<&mut {slice}>
forBox/Rc/Arc<{slice}>
- rc/Arc: don't leak the allocation if drop panics
- add LowerExp and UpperExp implementations to NonZero
- use Hacker's Delight impl in
i64::midpoint
instead of widei128
impl - xous: sync: remove
rustc_const_stable
attribute on Condvar and Mutexnew()
- add
const_panic
macro to make it easier to fall back to non-formatting panic in const - cargo: downgrade version-exists error to warning on dry-run
- cargo: add more metadata to
rustc_fingerprint
- cargo: add transactional semantics to
rustfix
- cargo: add unstable
-Zroot-dir
flag to configure the path from which rustc should be invoked - cargo: allow build scripts to report error messages through
cargo::error
- cargo: change config paths to only check
CARGO_HOME
for cargo-script - cargo: download targeted transitive deps of with artifact deps' target platform
- cargo fix: track version in fingerprint dep-info files
- cargo: remove requirement for --target when invoking Cargo with -Zbuild-std
- rustdoc: Fix
--show-coverage
when JSON output format is used - rustdoc: Unify variant
struct
fields margins withstruct
fields - rustdoc: make doctest span tweak a 2024 edition change
- rustdoc: skip stability inheritance for some item kinds
- mdbook: improve theme support when JS is disabled
- mdbook: load the sidebar toc from a shared JS file or iframe
- clippy:
infinite_loops
: fix incorrect suggestions on async functions/closures - clippy:
needless_continue
: check labels consistency before warning - clippy:
no_mangle
attribute requires unsafe in Rust 2024 - clippy: add new
trivial_map_over_range
lint - clippy: cleanup code suggestion for
into_iter_without_iter
- clippy: do not use
gen
as a variable name - clippy: don't lint unnamed consts and nested items within functions in
missing_docs_in_private_items
- clippy: extend
large_include_file
lint to also work on attributes - clippy: fix
allow_attributes
when expanded from some macros - clippy: improve display of clippy lints page when JS is disabled
- clippy: new lint
map_all_any_identity
- clippy: new lint
needless_as_bytes
- clippy: new lint
source_item_ordering
- clippy: return iterator must not capture lifetimes in Rust 2024
- clippy: use match ergonomics compatible with editions 2021 and 2024
- rust-analyzer: allow interpreting consts and statics with interpret function command
- rust-analyzer: avoid interior mutability in
TyLoweringContext
- rust-analyzer: do not render meta info when hovering usages
- rust-analyzer: add assist to generate a type alias for a function
- rust-analyzer: render extern blocks in
file_structure
- rust-analyzer: show
static
values on hover - rust-analyzer: auto-complete import for aliased function and module
- rust-analyzer: fix the server not honoring diagnostic refresh support
- rust-analyzer: only parse
safe
as contextual kw in extern blocks - rust-analyzer: parse patterns with leading pipe properly in all places
- rust-analyzer: support new
#[rustc_intrinsic]
attribute and fallback bodies
Rust Compiler Performance Triage
A week dominated by one large improvement and one large regression where luckily the improvement had a larger impact. The regression seems to have been caused by a newly introduced lint that might have performance issues. The improvement was in building rustc with protected visibility which reduces the number of dynamic relocations needed leading to some nice performance gains. Across a large swath of the perf suit, the compiler is on average 1% faster after this week compared to last week.
Triage done by @rylev. Revision range: c8a8c820..27e38f8f
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.8% | [0.1%, 2.0%] | 80 |
Regressions ❌ (secondary) |
1.9% | [0.2%, 3.4%] | 45 |
Improvements ✅ (primary) |
-1.9% | [-31.6%, -0.1%] | 148 |
Improvements ✅ (secondary) |
-5.1% | [-27.8%, -0.1%] | 180 |
All ❌✅ (primary) | -1.0% | [-31.6%, 2.0%] | 228 |
1 Regression, 1 Improvement, 5 Mixed; 3 of them in rollups 46 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
- [disposition: merge] Add support for
use Trait::func
Tracking Issues & PRs
Rust
- [disposition: merge] Stabilize Arm64EC inline assembly
- [disposition: merge] Stabilize s390x inline assembly
- [disposition: merge] rustdoc-search: simplify rules for generics and type params
- [disposition: merge] Fix ICE when passing DefId-creating args to legacy_const_generics.
- [disposition: merge] Tracking Issue for
const_option_ext
- [disposition: merge] Tracking Issue for const_unicode_case_lookup
- [disposition: merge] Reject raw lifetime followed by
'
, like regular lifetimes do - [disposition: merge] Enforce that raw lifetimes must be valid raw identifiers
- [disposition: merge] Stabilize WebAssembly
multivalue
,reference-types
, andtail-call
target features
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
- [new] Implement The Update Framework for Project Signing
- [new] [RFC] Static Function Argument Unpacking
- [new] [RFC] Explicit ABI in extern
- [new] Add homogeneous_
try_blocks
RFC
Upcoming Events
Rusty Events between 2024-11-06 - 2024-12-04 🦀
Virtual
- 2024-11-06 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-11-07 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-11-08 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2024-11-12 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-11-14 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-11-14 | Virtual and In-Person (Lehi, UT, US) | Utah Rust
- 2024-11-14 | Virtual and In-Person (Seattle, WA, US) | Seattle Rust User Group
- 2024-11-15 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2024-11-19 | Virtual (Los Angeles, CA, US) | DevTalk LA
- 2024-11-19 | Virtual (Washington, DC, US) | Rust DC
- 2024-11-20 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-11-21 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-11-21 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-11-21 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2024-11-25 | Bratislava, SK | Bratislava Rust Meetup Group
- 2024-11-26 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-11-28 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-11-28 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-12-03 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
Asia
- 2024-11-28 | Bangalore/Bengaluru, IN | Rust Bangalore
- 2024-11-30 | Tokyo, JP | Rust Tokyo
Europe
- 2024-11-06 | Oxford, UK | Oxford Rust Meetup Group
- 2024-11-06 | Paris, FR | Paris Rustaceans
- 2024-11-09 - 2024-11-11 | Florence, IT | Rust Lab
- 2024-11-12 | London, UK | Rust London User Group
- 2024-11-12 | Zurich, CH | Rust Zurich
- 2024-11-13 | Reading, UK | Reading Rust Workshop
- 2024-11-14 | Stockholm, SE | Stockholm Rust
- 2024-11-19 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2024-11-19 | Paris, FR | Rust Paris
- 2024-11-21 | Edinburgh, UK | Rust and Friends
- 2024-11-21 | Oslo, NO | Rust Oslo
- 2024-11-23 | Basel, CH | Rust Basel
- 2024-11-26 | Warsaw, PL | Rust Warsaw
- 2024-11-27 | Dortmund, DE | Rust Dortmund
- 2024-11-28 | Aarhus, DK | Rust Aarhus
- 2024-11-28 | Augsburg, DE | Rust Meetup Augsburg
- 2024-11-28 | Berlin, DE | OpenTechSchool Berlin + Rust Berlin
- 2024-11-28 | Hamburg, DE | Rust Meetup Hamburg
- 2024-11-28 | Prague, CZ | Rust Prague
- 2024-12-04 | Oxford, UK | Oxford Rust Meetup Group
North America
- 2024-11-07 | Chicago, IL, US | Chicago Rust Meetup
- 2024-11-07 | Montréal, QC, CA | Rust Montréal
- 2024-11-07 | St. Louis, MO, US | STL Rust
- 2024-11-12 | Ann Arbor, MI, US | Detroit Rust
- 2024-11-12 | New York, NY, US | Rust NYC
- 2024-11-14 | Mountain View, CA, US | Hacker Dojo
- 2024-11-15 | Mexico City, DF, MX | Rust MX
- 2024-11-15 | Somerville, MA, US | Boston Rust Meetup
- 2024-11-19 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-11-23 | Boston, MA, US | Boston Rust Meetup
- 2024-11-25 | Ferndale, MI, US | Detroit Rust
- 2024-11-27 | Austin, TX, US | Rust ATX
Oceania
- 2024-11-12 | Christchurch, NZ | Christchurch Rust 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
Any sufficiently complicated C project contains an adhoc, informally specified, bug ridden, slow implementation of half of cargo.
– Folkert de Vries at RustNL 2024 (youtube recording)
Thanks to Collin Richards for the 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, bennyvasquez.
Email list hosting is sponsored by The Rust Foundation