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
Foundation
Newsletters
Project/Tooling Updates
- Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign
- Diesel Async 0.5
- iroh 0.21.0 - Fix, clean & polish
- gitoxide [June 2024]
- Iced v0.12 Tutorial - Asynchronous actions with Commands
- Query.rs - A search engine for Rust
Observations/Thoughts
- without.boats - Pin
- without.boats - Pinned places
- RocksDB: Not A Good Choice for a High-Performance Streaming Platform
- A type system for RCL: Implementing a typechecker in Rust
- Beating the compiler
- Deconstructing the Role-Playing Video Game
- Implementing WebSockets
- Named Arguments In Rust, If You Want Them
- WebAssembly on the server: Compiling Rust to WASM and executing it from Go
- Async Rust: The new billion-dollar mistake?
- Nine Rust Cargo.toml Wats and Wat Nots: Master Cargo.toml formatting rules and avoid frustration
Rust Walkthroughs
Miscellaneous
Crate of the Week
This week's crate is diatomic-waker, a spinlock-less library for async task wakeup.
Thanks to Ddystopia 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.
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.
No Calls for papers or presentations were submitted this week.
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
402 pull requests were merged in the last week
- promote the
wasm32-wasip2
target to Tier 2 - CFI: support provided methods on traits
- MIR building: Stop using
unpack!
forBlockAnd<()>
C-cmse-nonsecure-call
: improved error messagesmacro_metavar_expr_concat
Add support for literalsmacro_metavar_expr_concat
Allowconcat
in repetitions- add Process support for UEFI
- add missing
try_new_uninit_slice_in
andtry_new_zeroed_slice_in
- change
binary_asm_labels
to only fire on x86 andx86_64
- cleanup dll/exe filename calculations in
run_make_support
- conditionally build
wasm-component-ld
- deal with invalid UTF-8 from
gai_strerror
- delegation: support coercion for target expression
- deny keyword lifetimes pre-expansion
- don't allow unsafe statics outside of extern blocks
- don't output incremental test artifacts into working directory
- don't use implicit features in
Cargo.toml
incompiler/
- fix ICE in suggestion caused by
⩵
being recovered as==
- fix a bunch of sites that were walking instead of visiting, making it impossible for visitor impls to look at these values
- fix ambiguous cases of multiple & in elided self lifetimes
- fix and enforce
unsafe_op_in_unsafe_fn
in compiler - fix associated item removal suggestion
- fix precise capturing suggestion for hidden regions when we have APITs
- fix the issue of invalid suggestion for a reference of iterator
- fixes panic error
index out of bounds
in conflicting error - forbid borrows and unsized types from being used as the type of a const generic under
adt_const_params
- interpret: add sanity check in dyn upcast to double-check what codegen does
- invert infer
error_reporting
mod struture - just totally fully deny late-bound consts
- lazy type aliases: diagnostics: Detect bivariant ty params that are only used recursively
- maintain the given order on step execution
- make ErrorGuaranteed discoverable outside types, consts, and lifetimes
- make
pub_use_of_private_extern_crate
show up in cargo's future breakage reports - match lowering: Use an iterator to find
expand_until
- accurate
use
rename suggestion span - more accurate span for anonymous argument suggestion
- more accurate span for type parameter suggestion
- use more accurate span for
addr_of!
suggestion - more accurate suggestion for
-> Box<dyn Trait>
or-> impl Trait
- parser: suggest placing the return type after function parameters
- safely enforce thread name requirements
- solve a error
.clone()
suggestion when moving a mutable reference - suggest a borrow when using dbg
- tweak suggestions when using incorrect type of
enum
literal - use ordinal number in argument error
- when finding item gated behind a
cfg
flag, point at it - miri: add
O_NOFOLLOW
flag support - miri: add
pread
andpwrite
shims - remove unnecessary impl sorting in queries and metadata
- some parser improvements
- fix least significant digits of f128 associated constants
- std: use
read_unaligned
for reads from DWARF impl Send + Sync
and overridecount
for theCStr::bytes
iteratorptr::metadata
: avoid references to extern types- add
isqrt
toNonZero<uN>
- use ThreadId instead of TLS-address in
ReentrantLock
- use Option's discriminant as its size hint
- use futex.rs for Windows thread parking
- windows: use futex implementation for
Once
- windows: prevent double reference in generic futex
- start using
#[diagnostic::do_not_recommend]
in the standard library - skip fast path for dec2flt when
optimize_for_size
- cargo toml: Improve error on missing package and workspace
- cargo: add
TomlPackage::new
,Default
forTomlWorkspace
- cargo: fix passing of links-overrides with target-applies-to-host and an implicit target
- rustdoc: click target for sidebar items flush left
- rustdoc: fix
current
class on sidebar modnav - rustdoc: short descriptions cause word-breaks in tables
- add cross-crate precise capturing support to rustdoc
- rustfmt: impl
rewrite_result
for ArmWrapper - rustfmt: return RewriteResult for
rewrite_path
&rewrite_struct_***
- clippy:
pathbuf_init_then_push
: Checks for calls topush
immediately a… - clippy: add lint for recreation of an entire
struct
- clippy: create lint passes using
Conf
- clippy: fix
excessive_precision
suggestions on floats written in scientific notation - clippy: fix wrong suggestion for
single_element_loop
where parens were missing - clippy: lint
zero_repeat_side_effects
only if array length is a literal zero - rust-analyzer: add missing dyn parse special cases in 2015 edition
- rust-analyzer: allow macro expansions into
RestPat
in tuple args work as ellipsis like plainRestPat
- rust-analyzer: avoid ref when using format! in compiler
- rust-analyzer: add inlay hint support for block expr with lifetime label
- rust-analyzer: edition aware parser
- rust-analyzer: go-to-def and find-references on control-flow keywords
- rust-analyzer: feature: teach rust-analyzer to discover
linked_projects
- rust-analyzer: fix incorrect generic parameter hint defaults
- rust-analyzer: fix path resolution for child mods of those expanded by
include!
- rust-analyzer: allow flyimport to import primitive shadowing modules
- rust-analyzer: don't call
macro_arg
directly inExpandDatabase::syntax_context
- rust-analyzer: fix more path resolution for included submodules
- rust-analyzer: handle synonymous imports with different renaming in 'merge imports'
- rust-analyzer: panic in debug profile for tuple deconstruct with arity mismatch
- rust-analyzer: remove incorrect never! invocations
- rust-analyzer: more
find_path
improvements - rust-analyzer: more symbol usage
- rust-analyzer: parse contextual dyn keyword properly in edition 2015
- rust-analyzer: reduce memory usage of salsa slots by 8 bytes
- rust-analyzer: prefer standard library paths over shorter extern deps re-exports
- rust-analyzer: set
RUSTC_TOOLCHAIN
for runnables - rust-analyzer: some more small salsa memory improvements
- rust-analyzer: support
rustc_skip_during_method_dispatch
- rust-analyzer: switch token trees to use Symbols
Rust Compiler Performance Triage
Light week, with few changes on any dimension (including memory), though overall a slight regression.
Triage done by @simulacrum. Revision range: 5572759b..9629b90b
1 Regression, 1 Improvement, 1 Mixed; 2 of them in rollups 34 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
- [disposition: not specified] RFC for project goals
- [disposition: merge] Promote aarch64-apple-darwin to Tier 1
- [disposition: merge] add float semantics RFC
Tracking Issues & PRs
Rust
- [disposition: merge] Tracking Issue for nested field access in offset_of
- [disposition: merge] [rustdoc] Add copy code feature
- [disposition: merge] Stabilize
const {integer}::from_str_radix
i.e.const_int_from_str
- [disposition: merge] Scoped thread implicit join doesn't wait for thread locals to be dropped
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-07-24 - 2024-08-21 🦀
Virtual
- 2024-07-24 | Virtual | Women in Rust
- 2024-07-25 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-07-27 | Hybrid - Virtual and In-Person (Kyiv, UA) | UA Rust
- 2024-07-27 | Virtual | Leptos Monthly Meetup
- 2024-07-30 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-07-31 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-08-01 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-08-06 | Virtual | Women in Rust
- 2024-08-06 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2024-08-06 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-08-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-08-08 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-08-08 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-08-08 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-08-13 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-08-15 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-08-20 | Virtual (Washington, DC, US) | Rust DC
- 2024-08-21 | Hybrid - Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
Africa
- 2024-08-02 | Kampala, UG | Rust Circle Kampala
Europe
- 2024-07-25 | Augsburg, DE | Rust Meetup Augsburg
- 2024-07-25 | Berlin, DE | OpenTechSchool Berlin + Rust Berlin
- 2024-07-27 | Hybrid - Virtual and In-Person (Kyiv, UA) | UA Rust
- 2024-07-30 | Basel, CH | Rust Basel
- 2024-08-14 | Reading, UK | Reading Rust Workshop
- 2024-08-20 | Aarhus, DK | Rust Aarhus
- 2024-08-21 | Nürnberg, DE | Rust Nuremberg
North America
- 2024-07-24 | Austin, TX, US | Rust ATC
- 2024-07-25 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-07-29 | Cambridge, MA, US| Boston Rust Meetup
- 2024-08-01 | St. Louis, MO, US | STL Rust
- 2024-08-08 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-08-08 | Seattle, WA, US | Seattle Rust User Group
- 2024-08-19 | Minneapolis, MN US | Minneapolis Rust Meetup
- 2024-08-20 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-08-21 | Hybrid - Vancouver, BC, CA | Vancouver Rust
Oceania
- 2024-08-01 | Brisbane, QLD, AU | Rust Brisbane
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
Rust doesn't give you good errors, it gives you control over errors.
Despite a woeful dearth of suggestions, llogiq is content with his choice.
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