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
- Next-gen builder macro Bon 2.2 release 🎉. Derive syntax and cfg support 🚀
- Redox OS 0.9.0 - Redox - Your Next(Gen) OS
Observations/Thoughts
- Rust on RP2350
- How we Built 300μs Typo Detection for 1.3M Words in Rust
- Compressing strings with FSST
- Local code intel using Ollama with Rust, Qdrant, FastEmbed and OpenTelemetry
- WebP: The WebPage compression format
- Porting C to Rust for a Fast and Safe AV1 Media Decoder
- Optimizing rav1d, an AV1 Decoder in Rust
- An Optimization That's Impossible in Rust!
- Why I started livestreaming as a Rust developer?
- What’s So Hard About Hashing Data?
- Module-companion for a standalone function - associated items for a function
- No more unchecked SQLx queries
- [video] Renaissance of Terminal User Interfaces with Rust — FrOSCon 2024
Rust Walkthroughs
- [video] Build with Naz : Explore Linux TTY, process, signals w/ Rust - Part 3/3
tokio::process::Command
Crate of the Week
This week's crate is cargo-override, a cargo plugin for quick overriding of dependencies.
Thanks to Ajith 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
399 pull requests were merged in the last week
- add support for GNU/Hurd on
x86_64
- add target support for RTEMS Arm
impl_trait_overcaptures
: Don't worry about uncaptured contravariant lifetimes if they outlive a captured lifetime- add suggestions for misspelled keywords
- add an internal lint that warns when accessing untracked data
- arbitrary self types v2: pointers feature gate
- autodiff Upstreaming - enzyme backend
- bypass linker configuration and cross target check for specific commands
- check WF of source type's signature on fn pointer cast
- correctly handle stability of
#[diagnostic]
attributes - coverage: count await when the Future is immediately ready
- delegation: support generics in associated delegation items
- distribute
rustc_codegen_cranelift
for Windows - do not attempt to prove unknowable goals
- do not call query to compute coroutine layout for synthetic body of async closure
- do not request sanitizers for naked functions
- do not skip linker configuration for
check
builds - don't suggest labeling
const
andunsafe
blocks - don't build by-move body when async closure is tainted
- don't emit
expect
/assume
in opt-level=0 - don't store region in
CapturedPlace
- fix ICE caused by missing span in a region error
- fix ICE in CMSE type validation
- fix ICE when
asm_const
andconst_refs_to_static
are combined - fix double handling in
collect_tokens
- fix enabling wasm-component-ld to match other tools
- fix: get llvm type of global val
- implement raw lifetimes and labels (
'r#ident
) - implement suggestions for
elided_named_lifetimes
- interpret: make typed copies lossy wrt provenance and padding
- make supertrait and implied predicates queries defaulted
- non-exhaustive structs may be empty
- rename dump of coroutine by-move-body to be more consistent, fix ICE in
dump_mir
- s390x: fix a regression related to backchain feature
- suggest
impl Trait
for References to Bare Trait in Function Header - supress niches in coroutines to avoid aliasing violations
- use
DeepRejectCtxt
to quickly rejectParamEnv
candidates - miri: a bit of refactoring in "sync"
- miri: detect when
pthread_mutex_t
is moved - miri: detect when
pthread_rwlock_t
is moved - miri: enable native libraries on macOS
- miri: fix comment in
mutex_id_offset
- miri: renamed variable and fixed comments referring to renamed FileDescriptor
- stabilize
-Znext-solver=coherence
- stabilize
char::MIN
- stabilize
const_float_bits_conv
- stabilize
waker_getters
- Fix CVE-2024-43402
- break into the debugger (if attached) on panics (Windows, Linux, macOS, FreeBSD)
- const: make
ptr.is_null()
stop execution on ambiguity - make
Result::copied
unstably const - str: make
as_mut_ptr
andas_bytes_mut
unstably const - use the trifecta div algorithm for 128-bit div on wasm
- cargo: resolve: Report MSRV compatible version instead of incomptible
- cargo: new: Add to workspace relative to manifest, not current-dir
- cargo: bail before packaging on same version
- cargo: don't automatically include the current crate when packaging
- cargo: fix cargo add behaving different when translating package name
- cargo: fix parsing of comma separated values in --crate-type flag
- cargo: include public/private dependency status in
cargo metadata
- cargo: publish workspace
- cargo: remove unnecessary symbols
- cargo: uplift windows gnullvm import libraries
- rustdoc-search: allow trailing
Foo →
arg search - rustdoc: Sort impl associated items by kinds and then by appearance
- rustdoc: add header map to the table of contents
- rustdoc: normalise type/field names
- rustdoc: use strategic boxing to shrink
clean::Item
- rustfmt: impl
rewrite_result
for ForeignItem, TraitAliasBounds, WherePredicate - rustfmt: impl
rewrite_result
forast::Expr
- rustfmt: implement version-sort for imports in
style_edition
2024 - bindgen: stabilize
--wrap-static-fns
- clippy:
single_match
,single_match_else
: fix suggestion when match irrefutable - clippy:
manual_div_ceil
: init - clippy: add new check for passing pointers to an
asm!
block withnomem
option - clippy: add new lint
manual_is_power_of_two
- clippy: added new
non_zero_suggestions
lint - clippy: fix
needless_return
false negative - clippy: move
manual_c_str_literals
to complexity - clippy: only lint
manual_non_exhaustive
for exported types - clippy: visit
struct
fields recursively in uninit fallback check - rust-analyzer: IDE support for
asm!
expressions - rust-analyzer: better name suggestions for fn
- rust-analyzer: always explicitly set
TraitRef
self types when lowering - rust-analyzer: catch panics from diagnostics computation
- rust-analyzer: couple asm! parsing and lowering fixes
- rust-analyzer: don't panic lsp writer thread on dropped receiver
- rust-analyzer: fix lowering of for loops dropping the loop block
- rust-analyzer: properly prevent mir building with unknown types present
- rust-analyzer: updating settings should not clobber discovered projects
Rust Compiler Performance Triage
A relatively quiet week with a majority of regressions coming in rollups which makes investigation more difficult. Luckily the regressions are relatively small and overall the week was a slight improvement in compiler performance.
Triage done by @rylev. Revision range: 6199b69c..263a3aee
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.6% | [0.2%, 1.4%] | 57 |
Regressions ❌ (secondary) |
0.7% | [0.2%, 1.5%] | 23 |
Improvements ✅ (primary) |
-2.2% | [-4.0%, -0.4%] | 23 |
Improvements ✅ (secondary) |
-0.3% | [-0.3%, -0.2%] | 10 |
All ❌✅ (primary) | -0.2% | [-4.0%, 1.4%] | 80 |
3 Regressions, 1 Improvement, 2 Mixed; 3 of them in rollups 26 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
- [disposition: merge] const-eval interning: accept interior mutable pointers in final value
- [disposition: merge] Stabilize
&mut
(and*mut
) as well as&Cell
(and*const Cell
) in const - [disposition: merge] [library/std/src/process.rs]
PartialEq
forExitCode
- [disposition: merge] Relate receiver invariantly in method probe for
Mode::Path
- [disposition: merge] (Anti-)regression between Rust 1.78.0 and Rust 1.79.0 with struct containing
Cow<[Self]>
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team Tracking Issues or PRs 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
- No New or Updated RFCs were created this week.
Upcoming Events
Rusty Events between 2024-09-11 - 2024-10-09 🦀
Virtual
- 2024-09-10 - 2024-09-13 | Hybrid: Virtual and In-Person (Montreal, QC, CA) | Rust Conf
- 2024-09-12 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-09-12 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2024-09-12 | Virtual (San Diego, CA, US) | San Diego Rust
- 2024-09-16 | Virtual | Women in Rust
- 2024-09-17 | Virtual (Washington, DC, US) | Rust DC
- 2024-09-18 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-09-18 - 2024-09-20 | Hybrid - Virtual and In-Person (Vienna, AT) | Linux Plumbers Conference
- 2024-09-19 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-09-19 | Virtual and In-Person (Seattle, WA, US) | Seattle Rust User Group
- 2024-09-24 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-09-26 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-09-26 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-10-02 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-10-02 | Virtual (Vancouver, BC, CA) | Vancouver Postgres
- 2024-10-03 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-10-08 | Virtual (Dallas, TX, US) | Dallas Rust
Africa
- 2024-10-05 | Kampala, UG | Rust Circle Kampala
Asia
- 2024-09-14 | Bangalore, IN | Rust Bangalore
- 2024-09-21 | Bangalore/Bengaluru, IN | Rust Bangalore
Europe
- 2024-09-11 | Reading, UK | Reading Rust Workshop
- 2024-09-17 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2024-09-17 | Manchester, UK | Rust Manchester
- 2024-09-17 | Trondheim, NO | Rust Trondheim
- 2024-09-18 | Moravia, CZ | Rust Moravia
- 2024-09-18 | Vienna, AT + Virtual | Linux Plumbers Conference
- 2024-09-21 | Stockholm, SE | Stockholm Rust
- 2024-09-23 | Bratislava, SK | Bratislava Rust Meetup Group
- 2024-09-24 | Paris, FR | Rust Paris
- 2024-09-24 | Stockholm, SE | Stockholm Rust
- 2024-09-26 | Aarhus, DK | Rust Aarhus
- 2024-09-26 | Augsburg, DE | Rust Meetup Augsburg
- 2024-09-26 | Berlin, DE | OpenTechSchool Berlin + Rust Berlin
- 2024-09-26 | Prague, CZ | Rust Prague
- 2024-09-27 | Mannheim, DE | Hackerstolz e.V.
- 2024-10-02 | Oxford, UK | Oxfrod Rust Meetup Group
- 2024-10-02 | Stockholm, SE | Stockholm Rust
- 2024-10-03 | Nürnberg, DE | Rust Nurnberg DE
- 2024-10-03 | Oslo, NO | Rust Oslo
- 2024-10-09 | Reading, UK | Reading Rust Workshop
North America
- 2024-09-11 | Boulder, CO, US | Boulder Rust Meetup
- 2024-09-12 | Chicago, IL, US | Deep Dish Rust
- 2024-09-16 | Cambridge, MA, US | Boston Rust Meetup
- 2024-09-17 | Minneapolis, MN US | Minneapolis Rust Meetup
- 2024-09-17 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-09-18 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-09-19 | Virtual and In-Person (Seattle, WA, US) | Seattle Rust User Group
- 2024-09-21 | Longview, TX, US | Longview Code and Coffee
- 2024-09-24 | Detroit, MI, US | Detroit Rust
- 2024-09-25 | Austin, TX, US | Rust ATX
- 2024-09-26 | Nashville, TN, US | Music City Rust Developers
- 2024-09-27 | Cambridge, MA, US | Boston Rust Meetup
- 2024-10-03 | St. Louis, MO, US | STL Rust
- 2024-10-08 | Detroit, MI, US | Detroit Rust
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
Alas! We are once more bereft
of a quote to elate or explain
so this editor merely has left
the option in rhyme to complain.
– llogiq
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