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
- rust-analyzer changelog #238
- Enhancing Code Completion for Rust in Cody
- Apache Datafusion-Comet- Rust-Based Apache Spark accelerator - 1.5x performance improvements in apache spark TPC-H queries, and other commodity hardware
- Fluvio Distributed Streaming Engine Release 0.11.9
Observations/Thoughts
- Path Generics in Rust: A Sketch Proposal for Simplicity and Generality
- Dioxus Labs + “High-level Rust”
- Making Your First Real-World Rust Project a Success
- Future's liveness problem
- Optimizing Rust code with Flamegraph and DHAT – a practical example with Dust DDS
- Exograph at the Edge with Cloudflare Workers
- GraphQL Server in the Browser using WebAssembly
- [video] Compiler-Driven Development in Rust
- [video] Rust 1.79.0: Top 10 Most Interesting Things
- [audio] What's New in Rust 1.72 and 1.73
- [audio] Matic with Eric Seppanen
Rust Walkthroughs
- Rust Ownership Explained: Merging Linked Lists
- Zero to Performance Hero: How to Benchmark and Profile Your eBPF Code in Rust
- IPC in Rust - a Ping Pong Comparison
- I ported h2spec to Rust (also: codegen!)
- Parsing Python ASTs 20x Faster with Rust
- Making a const version of Rust's array::from_fn - How hard can it be?
- Using Tauri to build a cross-platform security app
- Generate and package Rust client SDKs with Buf
- [series] Master Hexagonal Architecture in Rust (part 2): Separation of Concerns, Rust-Style
Research
- SquirrelFS: using the Rust compiler to check file-system crash consistency
- Trusting code in the wild: Exploring contributor reputation measures to review dependencies in the Rust ecosystem
Miscellaneous
Crate of the Week
This week's crate is yazi, a blazing fast terminal file manager based on async I/O.
Despite a lamentable lack of suggestions, llogiq is content with his choice.
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.
- Rust Ukraine 2024 | Closes 2024-07-06 | Online + Ukraine, Kyiv | Event date: 2024-07-27
- Conf42 Rustlang 2024 | Closes 2024-07-22 | online | Event date: 2024-08-22
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
470 pull requests were merged in the last week
- promote
arm64ec-pc-windows-msvc
to tier 2 - edition 2024: Make
!
fall back to!
E0229
: Suggest Moving Type Constraints to Type Parameter DeclarationUniqueRc
: support allocators andT: ?Sized
- account for existing bindings when suggesting
pin!()
- add a new concat metavar expr
- avoid ICEs after reporting errors on erroneous patterns
- build
libcxx-version
only when it doesn't exist - change method resolution to constrain hidden types instead of rejecting method candidates
- check that alias-relate terms are WF if reporting an error in alias-relate
- consistently use subtyping in method resolution
- const validation: fix ICE on dangling ZST reference
- const-eval: make lint scope computation consistent
- coverage: arrange span extraction/refinement as a series of passes
- coverage: replace the old span refiner with a single function
- delegation: fix ICE on late diagnostics
- delegation: fix ICE on recursive delegation
- delegation: fix hygiene for
self
- detect pub structs never constructed even though they impl pub trait with assoc constants
- do not ICE in privacy when type inference fails
- do not define opaque types when selecting impls
- ensure self-contained linker is only enabled on dev/nightly
- expand list of trait implementers in E0277 when calling rustc with --verbose
- for E0277 suggest adding
Result
return type for function when using QuestionMark?
in the body - harmonize using root or leaf obligation in trait error reporting
- honor
collapse_debuginfo
for statics - implement lint for obligations broken by never type fallback change
- improve escaping of byte, byte str, and c str proc-macro literals
- interpret: dyn trait metadata check: equate traits in a proper way
- interpret: ensure we check bool/char for validity when they are used in a cast
- make
ObligationEmittingRelation
s emitGoal
rather thanObligation
- make
storage-live.rs
robust against rustc internal changes - make suggestion to change
Fn
toFnMut
work with methods as well - mark undetermined if target binding in current ns is not got
- move
MatchAgainstFreshVars
to old solver - no uninitalized report in a pre-returned match arm
- only compute
specializes
query if (min)specialization is enabled in the crate of the specializing impl - only compute vtable information during codegen
- place explicit lifetime bound after generic param
- point out failing never obligation for
DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK
- print
token::Interpolated
with token stream pretty printing - provide correct parent for nested anon const
- resolve elided lifetimes in assoc const to static if no other lifetimes are in scope
- safe transmute: support
Single
enums - walk into alias-eq nested goals even if normalization fails
- simplify provider api to improve llvm ir
- smir: merge identical Constant and ConstOperand types
- spell out other trait diagnostic
- spruce up the diagnostics of some early lints
- tait must be constrained if in sig
- unify guarantees about the default allocator
- unify intrinsics body handling in StableMIR
- use
Variance
glob imported variants everywhere - use a consistent way to filter out bounds instead of splitting it into three places
- MIR Shl/Shr: the offset can be computed with
rem_euclid
- miri: cargo miri: add support for '--many-seeds'
- miri: implement LLVM x86 SSE4.2 intrinsics
- miri: show proper UB when making a too large allocation request
- miri: tell people how to set miri flags
rustc_span
: Optimize more hygiene operations usingSpan::map_ctxt
- split core's PanicInfo and std's PanicInfo
- remove superfluous UbChecks from
SliceIndex
methods std::unix::fs::link
using direct linkat call for Solaris- simplify
[T; N]::try_map
signature - follow up to splitting core's PanicInfo and std's PanicInfo
- make
PathBuf
less Ok with adding UTF-16 theninto_string
- add
Option::is_none_or
- add
f16
andf128
const eval for binary and unary operationations - add
f16
andf128
inline ASM support forx86
andx86-64
- make
ptr::rotate
smaller when usingoptimize_for_size
- hashbrown: improve Set Difference
size_hint
lower bound - hashbrown: make equivalent default feature
- hashbrown: optimize Set
is_disjoint
- cargo fix: Address problems with implicit → explicit feature migration
- cargo: add assert redactions
- cargo: add local registry overlays
- cargo: change verification order during packaging
- cargo test: redact conditional compile-fail warning
- cargo: use
std::fs::absolute
instead of reimplementing it - clippy: add MSRV for
manual_pattern_char_comparison
- clippy: add
field_scoped_visibility_modifiers
lint - clippy: add lint
manual_inspect
- clippy: add lint to check manual pattern char comparison
- clippy: avoid emitting
assigning_clones
when cloned data borrows from the place to clone into - clippy: don't lint
indexing_slicing
lints on proc macros - clippy: fix ICE in
upper_case_acronyms
- clippy: handle single chars with
to_string()
forsingle_char_add_str
- clippy: let
qualify_min_const_fn
deal with drop terminators - clippy: lint
manual_unwrap_or
for it let cases - clippy: normalize type aliases when checking significant drops
- clippy: rework
octal_escapes
- rust-analyzer: allow choosing logical cores for num threads config
- rust-analyzer: allow rust-project.json to include arbitrary shell commands for runnables
- rust-analyzer: show type bounds from containers when hovering on functions
- rust-analyzer: fix and cleanup VSCode task building
- rust-analyzer: add a breaker to avoid infinite loops from source root cycles
- rust-analyzer: avoid doubling cargo args in runnables
- rust-analyzer: fix
HirDisplay
stackoverflow for parameter Self defaults - rust-analyzer: fix pat fragment parsers choking on
<eoi>
- rust-analyzer: properly prime all crate def maps in
parallel_prime_caches
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
- [disposition: merge] UnsafePinned: allow aliasing of pinned mutable references
- [disposition: postpone] RFC: make Cargo embed dependency versions in the compiled binary
Tracking Issues & PRs
Rust
- [disposition: merge] RFC: Return Type Notation
- [disposition: merge] RFC: Unblock Cargo feature metadata
- [disposition: postpone] Allow requiring "at least one feature"
- [disposition: postpone] Add a general mechanism of setting RUSTFLAGS in Cargo for the root crate only
- [disposition: close] Allow specifying dependencies for individual artifacts
- [disposition: postpone] RFC: make Cargo embed dependency versions in the compiled binary
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team RFCs 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 RFCs entered Final Comment Period this week.
New and Updated RFCs
- [new] repr(type) for type aliases
- [new] Proposed 2024h2 flagship goal: Rust for Linux
- [new] Async project goal
Upcoming Events
Rusty Events between 2024-06-19 - 2024-07-17 🦀
Virtual
- 2024-06-19 | Hybrid - Virtual and In-person (Vancouver, BC, CA) | Vancouver Rust
- 2024-06-20 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-06-25 | Virtual (Dallas, TX, US) | Dallas Rust User Group
- 2024-06-25 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-06-27 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-07-02 | Virtual (Buffalo, NY) | Buffalo Rust Meetup
- 2024-07-02 | Hybrid - Virtual and In-person (Los Angeles, CA, US) | Rust Los Angeles
- 2024-07-03 | Virtual | Training 4 Programmers LLC
- 2024-07-03 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-07-04 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-07-06 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2024-07-09 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-07-10 | Virtual | Centre for eResearch
- 2024-07-11 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-07-11 | Hybrid - Virtual and In-person (Mexico City, DF, MX) | Rust MX
- 2024-07-11 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-07-11 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-07-16 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-07-17 | Hybrid - Virtual and In-person (Vancouver, BC, CA) | Vancouver Rust
Asia
- 2024-06-22 | Bangalore, IN | Rust Bangalore
- 2024-06-22 | Delhi, IN | PyDelhi - Python Delhi User Group!
- 2024-06-23 | Tel Aviv, Israel | Rust in Israel
- 2024-06-30 | Kyoto, JP | Kyoto Rust
Europe
- 2024-06-19 - 2024-06-24 | Zürich, CH | RustFest Zürich
- 2024-06-20 | Aarhus, DK | Rust Aarhus
- 2024-06-25 | Gdańsk, PL | Rust Gdansk
- 2024-06-27 | Berlin, DE | Rust Berlin
- 2024-06-27 | Copenhagen, DK | Copenhagen Rust Community
- 2024-07-10 | Reading, UK | Reading Rust Workshop
- 2024-07-11 | Prague, CZ | Rust Prague
- 2024-07-16 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2024-07-16 | Mannheim, DE | Hackschool - Rhein-Neckar
North America
- 2024-06-19 | Hybrid - Vancouver, BC, CA | Vancouver Rust
- 2024-06-20 | Seattle, WA, US | Seattle Rust User Group
- 2024-06-22 | Los Angeles, CA, US | LA Bitcoin Devs
- 2024-06-24 | Somerville, MA, US | Boston Rust Meetup
- 2024-06-26 | Austin, TX, US | Rust ATC
- 2024-06-27 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-06-27 | Nashville, TN, US | Music City Rust Developers
- 2024-06-27 | St. Louis, MO, US | STl Rust
- 2024-07-02 | Hybrid - Los Angeles, CA, US | Rust Los Angeles
- 2024-07-05 | Boston, MA, US | Boston Rust Meetup
- 2024-07-11 | Hybrid - Mexico City, DF, MX | Rust MX
- 2024-07-11 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-07-17 | Hybrid - Vancouver, BC, CA | Vancouver Rust
Oceania
- 2024-06-20 | Auckland, NZ | Rust AKL
- 2024-06-25 | Canberra, ACt, AU | Canberra Rust User Group (CRUG)
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
If there’s a backdoor attack lurking in the crates ecosystem, then it’s lurking pretty deep at present. The popular crates that we all rely on day to day generally appear to be what they say they are.
Thanks to Brian Kung 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