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
- This Month in Rust OSDev: August 2024
- This Week In Bevy - Required Components, Curves, and the Bevy CLI Working Group
Project/Tooling Updates
- FreeBSD considers Rust in the base system
- GCC Rust - August 2024 Monthly report
- This month in Servo: tabbed browsing, Windows buffs, devtools, and more!
- iroh 0.24.0 - Upgrading to Quinn 11
- Swiftide 0.9 - Fluvio, Lancedb and RAGAS support
- Next-gen builder macro Bon 2.1 release 🎉. Compilation is faster by 36% 🚀
- Nutype 0.5.0: the newtype with guarantees supports custom errors now
- BackON Reaches v1
Observations/Thoughts
- Defeating Coherence in Rust with Tacit Trait Parameters
- Rust On Illumos
- Rust for Linux revisited
- Async Rust can be a pleasure to work with (without
Send + Sync + 'static
) - Rust - A low-level echo server using io_uring
- Deploying Rust in Existing Firmware Codebases
- Your own little memory strategy
- Code Generation with GraphQL in Rust
- How to deadlock Tokio application in Rust with just a single mutex
- Is this trait sealed, or not sealed — that is the question
- Beyond Ctrl-C: The dark corners of Unix signal handling
- Rust to Assembly: Understanding the Inner Workings of Rust
- K-Means Image Compression
- Hey Rustaceans: Rust freelancers do exist!
- Why Rust needs scoped generics
Rust Walkthroughs
- [series] [video] Rust for Beginners in Arabic
- [video] Crafting an Interpreter in Rust #01: Basic Bytecode Chunks
- [video] Crafting an Interpreter in Rust #02: First Virtual Machine
- [video] Explore Linux TTY, process, signals w/ Rust - Part 2/3 (signal, proc, IPC egs)
Miscellaneous
- Whither the Apple AGX graphics driver?
- Counting iterations - count() vs collect().len()
- [audio] Learn Rust, Train Doctors – Interview With Caroline Morton
- [video] Creating a modding system with Rust and WebAssembly [Voxel Devlog #21]
- [video] From Zero to Async in Embedded Rust
Crate of the Week
This week's crate is vimania-uri-rs, a VIM plugin for file and URI handling.
Thanks to sysid 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.
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
416 pull requests were merged in the last week
- ABI compat check: detect unadjusted ABI mismatches
rustc_target
: Add various aarch64 featuresub_checks
intrinsics: fall back tocfg(ub_checks)
- add
aarch64_unknown_nto_qnx700
target - QNX 7.0 support for aarch64le - add
needs-unwind
compiletest directive tolibtest-thread-limit
and replace somePath
withpath
inrun-make
- add an ability to convert between
Span
andvisit::Location
- add missing
needs-llvm-components
directives for run-make tests that need target-specific codegen - add repr to the allowlist for naked functions
- const fn stability checking: also check declared language features
- const-eval: do not make UbChecks behavior depend on current crate's flags
- coverage: rename
CodeRegion
toSourceRegion
- create opaque definitions in resolver
- debug-fmt-detail option
- deny
wasm_c_abi
lint to nudge the last 25% - deny imports of
rustc_type_ir::inherent
outside of type ir + new trait solver - do not call
source_span
when not tracking dependencies - don't make statement nonterminals match pattern nonterminals
- don't use
TyKind
in a lint - emit specific message for
time<=0.3.35
- enable Miri to pass pointers through FFI
- exit: explain our expectations for the exit handlers registered in a Rust program
- expand NLL MIR dumps
- fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf
- get rid of
predicates_defined_on
- implement a first version of RFC 3525:
struct
target features - interpret, codegen: tweak some comments and checks regarding Box with custom allocator
- interpret/visitor: make memory order iteration slightly more efficient
- interpret: add missing alignment check in
raw_eq
- interpret: do not make const-eval query result depend on tcx.sess
- linker: synchronize native library search in rustc and linker
- lint that warns when an elided lifetime ends up being a named lifetime (
elided_named_lifetimes
) - llvm-wrapper: adapt for LLVM API changes
- make decoding non-optional
LazyArray
panic if not set - make it possible to enable
const_precise_live_drops
per-function - make the "detect-old-time" UI test more representative
- make the const-unstable-in-stable error more clear
- more
unreachable_pub
- move
'tcx
lifetime off of impl and onto methods forCrateMetadataRef
- move the Windows
remove_dir_all
impl into a module and make it more race resistant - process.rs: remove "Basic usage" text where not useful
- re-enable android tests/benches in alloc/core
- refactor: standardize duplicate processes in parser
- rename
BikeshedIntrinsicFrom
toTransmuteFrom
- replace walk with visit so we dont skip outermost expr kind in def collector
- rewrite
lint_expectations
in a single pass - riscv64imac: allow shadow call stack sanitizer
- separate core search logic with search ui
- simplify some extern providers
- std: move allocators to
sys
- stop storing a special inner body for the coroutine by-move body for async closures
- stop using
ty::GenericPredicates
fornon-predicates_of
queries - tweak some attributes to improve
panic_immediate_abort
- use a reduced recursion limit in the MIR inliner's cycle breaker
- use equality when relating formal and expected type in arg checking
- use unsafe extern blocks throughout the compiler
- wasi: fix sleeping for
Duration::MAX
- miri: add tokio io test
- miri: make TB tree traversal bottom-up
- miri: make Tree Borrows Provenance GC compact the tree
- miri: support blocking for epoll
- apply size optimizations to panic machinery and some cold functions
derive(SmartPointer)
: assume pointee from the single generic and better error messages- add
fmt::Debug
tosync::Weak<T, A>
- add missing
read_buf
stub forx86_64-unknown-l4re-uclibc
- allow
BufReader::peek
to be called on unsized types - core: use
compare_bytes
for more slice element types - fix
Pin::set
bounds regression - improved
checked_isqrt
andisqrt
methods - partially stabilize
feature(new_uninit)
- hashbrown: add
HashTable::iter_hash
,HashTable::iter_hash_mut
- cargo: resolve: Report incompatible-with-rustc when MSRV-resolver is disabled
- cargo: resolve: Report incompatible packages with precise Rust version
- cargo: pkgid: Allow open namespaces in PackageIdSpec's
- cargo: fix elided lifetime
- rustfmt: implement 2024 expression overflowing
- clippy: extend
implicit_saturating_sub
lint - clippy: new lint:
zombie_processes
- clippy: remove
feature=cargo-clippy
argument - rust-analyzer: extra sugar auto-completion
async fn ...
inimpl trait
forasync fn in trait
that's defined in desugar form - rust-analyzer: fix handling of
for
inimpl T for A
in function body - rust-analyzer: add explicit
enum
discriminant assist - rust-analyzer: do not report missing unsafe on
addr_of[_mut]!(EXTERN_OR_MUT_STATIC)
- rust-analyzer: create an assist to convert closure to freestanding fn
- rust-analyzer: implement cast typecheck and diagnostics
- rust-analyzer: implement object safety and its hovering hint
- rust-analyzer: suggest name in completion for
let_stmt
andfn_param
- rust-analyzer: support fn-ptr and fn-path types for lifetime elision hints
- rust-analyzer: fix incorrect symbol definitions in SCIP output
- rust-analyzer:
std::error::Error
is object unsafe - rust-analyzer: consider field attributes when converting from tuple to named
struct
and the opposite - rust-analyzer: consider indentation in the "Generate impl" and "Generate trait impl" assists
- rust-analyzer: don't add reference when it isn't needed for the "Extract variable" assist
- rust-analyzer: fix
TokenStream::to_string
implementation dropping quotation marks - rust-analyzer: fix lifetime elision inlay hints breaking for ranged requests
- rust-analyzer: fix name resolution of shadowed builtin macro
- rust-analyzer: handle attributes correctly in "Flip comma"
- rust-analyzer: lifetime hint panic in non generic defs
- rust-analyzer: use Result type aliases in "Wrap return type in Result" assist
- rust-analyzer: provide an option to hide deprecated items from completion
- rust-analyzer: recategorize config classes
Rust Compiler Performance Triage
This week we had some trouble with our performance bot, but luckily the issue has been resolved. In the end, we saw much more improvements than regressions.
Triage done by @kobzol. Revision range: acb4e8b6..6199b69c
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.3% | [0.2%, 0.4%] | 8 |
Regressions ❌ (secondary) |
0.7% | [0.2%, 1.5%] | 9 |
Improvements ✅ (primary) |
-0.8% | [-3.4%, -0.2%] | 158 |
Improvements ✅ (secondary) |
-0.7% | [-2.3%, -0.2%] | 96 |
All ❌✅ (primary) | -0.7% | [-3.4%, 0.4%] | 166 |
2 Regressions, 3 Improvements, 1 Mixed; 3 of them in rollups 19 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] Update
catch_unwind
doc comments forc_unwind
- [disposition: merge] stabilize
const_extern_fn
- [disposition: merge] stabilize const_float_bits_conv
- [disposition: merge] Make destructors on
extern "C"
frames to be executed - [disposition: merge] Don't warn empty branches unreachable for now
- [disposition: merge] Tracking Issue for
char::MIN
- [disposition: merge] Tracking issue for
#![feature(entry_insert)]
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
- [new] [RFC] code name support
- [new] Generic Integers V2: It's Time
- [new] Simplify lightweight clones, including into closures and async blocks
Upcoming Events
Rusty Events between 2024-09-04 - 2024-10-02 🦀
Virtual
- 2024-09-04 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-09-05 | Virtual (Buenos Aires, AR) | LambdaClass
- 2024-09-05 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-09-05 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-09-10 | Virtual (Dallas, TX, US) | Dallas Rust
- 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-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 (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-10-02 | Virtual (Vancouver, BC, CA) | Vancouver Postgres
Africa
- 2024-09-06 | Kampala, UG | Rust Circle Kampala
Asia
- 2024-09-07 - 2024-09-08 | Shanghai, CN | Rust China
- 2024-09-09 | Ramat Gan, IL | Coralogix
- 2024-09-14 | Bangalore, IN | Rust Bangalore
Europe
- 2024-09-04 | Oxford, UK | Oxfrod Rust Meetup Group
- 2024-09-11 | Reading, UK | Reading Rust Workshop
- 2024-09-17 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 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 | Stockholm, SE | Stockholm Rust
- 2024-09-26 | Aarhus, DK | Rust Aarhus
- 2024-09-27 | Mannheim, DE | Hackerstolz e.V.
- 2024-10-02 | Stockholm, SE | Stockholm Rust
North America
- 2024-09-05 | Lehi, UT, US | Utah Rust
- 2024-09-05 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-09-05 | Portland, OR, US | PDX Rust
- 2024-09-05 | St. Louis, MO, US | STL Rust
- 2024-09-07 | Longview, TX, US | Longview Code and Coffee
- 2024-09-08 | Cambridge, MA, US | Boston Rust Meetup
- 2024-09-10 - 2024-09-13 | Hybrid: Virtual and In-Person (Montreal, QC, CA) | Rust Conf
- 2024-09-11 | Boulder, CO, US | Boulder Rust Meetup
- 2024-09-16 | Cambridge, MA, US | Boston 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
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'm pretty sure I'm the only person ever to single handedly write a complex GPU kernel driver that has never had a memory safety kernel panic bug (itself) in production, running on thousands of users' systems for 1.5 years now.
Because I wrote it in Rust.
Thanks to Ludwig Stecher 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