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
Project/Tooling Updates
- This Month in Xilem, August 2024
- Next-gen builder macro Bon 2.3 release
- RootAsRole 3.0 Release
- Maelstrom 0.12.0
- Announcing vf2
Observations/Thoughts
- I landed my dream job making a Rust game engine. Now what?
- [audio] Talking to Microcontrollers with Postcard-RPC
Rust Walkthroughs
Research
Miscellaneous
- August '24 Rust Jobs Report
- [video] QnA with Friends: Orhun Parmaksiz on Open Source, the Rust Community and TUI's in Rust
Crate of the Week
This week's crate is lepton-jpeg-rust, Microsoft's port of Dropbox' lepton space-saving JPEG compressor library to Rust.
Thanks to Kornel 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.
- zerocopy - Make derive macros hygienic
- zerocopy - Ensure all safety comments quote and cite a specific version of the documentation
- zerocopy - Inline trait methods in derive-generated code
- zerocopy - Configure OpenSSF Scorecard's
Pinned-Dependencies
check to block CI
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
351 pull requests were merged in the last week
- deprecate -Csoft-float because it is unsound (and not fixable)
- add -Z small-data-threshold
- fix conflicting negative impl marker
- add a machine-applicable suggestion to "unreachable pattern"
- add system libs for LLVM when cross compiling for Windows
- also emit
missing_docs
lint with--test
to fulfil expectations - avoid crashing on variadic functions when producing arg-mismatch errors
- const-eval interning: accept interior mutable pointers in final value
- const: don't ICE when encountering a mutable ref to immutable memory
- correctly account for niche-optimized tags in
rustc_transmute
- disallow
naked_asm!
outside of#[naked]
functions - do precise capturing arg validation in resolve
- don't ICE when RPITIT captures more method args than trait definition
- don't ICE when generating
Fn
shim for async closure with borrowck error - don't leave debug locations for constants sitting on the builder indefinitely
- don't suggest adding return type for closures with default return type
- don't use
typeck_root_def_id
in codegen for finding closure's root - don't warn empty branches unreachable for now
- enumerate lint expectations using AttrId
- fix
Parser::break_up_float
's right span - fix anon const def-creation when macros are involved
- fix crash when labeling arguments for
call_once
and friends - fix default/minimum deployment target for Aarch64 simulator targets
- fix false positive with
missing_docs
and#[test]
- fix linking error when compiling for 32-bit watchOS
- fix lint levels not getting overridden by attrs on
Stmt
nodes - generalize: track relevant info in cache key
- layout computation: gracefully handle unsized types in unexpected locations
- compute Rust exception class from its string repr
- limit
libc::link
usage tonto70
target only, not NTO OS - linker: allow MSVC to use import libraries following the Meson/MinGW convention
- make basic allocation functions
track_caller
in Miri for nicer backtraces - make dist vendoring configurable
- make some lint doctests compatible with
--stage=0
- map
ERROR_CANT_RESOLVE_FILENAME
toErrorKind::FilesystemLoop
- map
WSAEDQUOT
toErrorKind::FilesystemQuotaExceeded
- more eagerly discard constraints on overflow
- properly report error on
const gen fn
- report the
note
when specified indiagnostic::on_unimplemented
- rescope temp lifetime in if-let into IfElse with migration lint
- simplify the canonical clone method and the copy-like forms to copy
- some fixes for
clashing_extern_declarations
lint - suggest the correct pattern syntax on usage of unit variant pattern for a
struct
variant - ban non-array SIMD
simd_shuffle
: require index argument to be a vector- interpret, miri: fix dealing with overflow during slice indexing and allocation
- interpret:
get_ptr_alloc_mut
: lookup allocation only once - interpret: simplify SIMD type handling
- notify miri when intrinsics are changed
- miri: fix overflow detection for unsigned pointer offset
- miri: treat non-memory local variables properly for data race detection
- miri: /miri run: directly run binary instead of using 'cargo run'
- miri: add Android pthread support
- miri: add non-portable linux pthread initializers to layout sanity check
- miri: detect when
pthread_cond_t
is moved - miri: support pthread primitives on FreeBSD
- stabilize
&mut
(and*mut
) as well as &Cell(and
*const Cell) in const
- stabilize
const_extern_fn
- stabilize
entry_insert
- stabilize most of
io_error_more
- implement
PartialEq
forExitCode
- move
Option::unwrap_unchecked
intoconst_option
feature gate - add
NonNull
convenience methods toBox
andVec
- add
core::panic::abort_unwind
- properly handle EOF in
BufReader::peek
- implement feature
string_from_utf8_lossy_owned
for lossy conversion fromVec<u8>
toString
methods - futures:
#[inline(always)]
onclone_arc_raw
- futures: add accessors for the inner of
stream::Iter
- cargo:
fix(vendor)
: trust crate version only when coming from registries - cargo: disable the
shell_completions
tests - cargo: add custom completer for
cargo -Z <TAB>
- cargo: add custom completer for completing bin names
- cargo: add custom completer for completing installed binaries
- cargo: add native comlpetion with CompleteEnv under the nightly
- rustdoc rfc#3662 changes under unstable flags
- rustdoc: add two regression tests
- rustdoc: rename
issue-\d+.rs
tests to have meaningful names (part 9) - rustdoc: unify the short-circuit on all lints
- rustfmt:
config_proc_macro
: reduce syn's features - rustfmt: format trailing where clauses in type aliases
- rustfmt: non-panicking
fmt::Display
forFileName
- rustfmt: refactor - show file path in error message when parsing config from toml
- clippy: look at adjusted types instead of fn signature types in
ptr_arg
- clippy: not trigger
duplicated_attributes
on duplicate reasons - clippy: special-case suggestions for null pointers constness cast
- clippy: consider msrv for const context for
const_float_bits_conv
- rust-analyzer: add command to report unresolved references
- rust-analyzer: assist: ensure
replace_qualified_name_with_use
applies to the first path segment - rust-analyzer: automatically add semicolon when completing unit-returning functions
- rust-analyzer: generate names for tuple-struct in add-missing-match-arms
- rust-analyzer: render patterns in params for hovering
- rust-analyzer: correctly escape strings in our quote macro
- rust-analyzer: don't emit empty inlay hint parts
- rust-analyzer: don't report typed hole error in asm! out ops
- rust-analyzer: faulty notifications should not bring down the server
- rust-analyzer: fix
inline_const_as_literal
error when the number >= 10 - rust-analyzer: fix inference of literals when the expectation is Castable
- rust-analyzer: fix printing of constants greater than
i128::MAX
- rust-analyzer: immutable tree panic in
generate_delegate_trait
- rust-analyzer: skip checks for cast to dyn traits
- rust-analyzer: use more correct handling of lint attributes
Rust Compiler Performance Triage
A relatively quiet week, with overall neutral performance across our set of key metrics (instructions, cycles, memory).
Triage done by @simulacrum. Revision range: 263a3aee..170d6cb8
2 Regressions, 3 Improvements, 4 Mixed; 2 of them in rollups 54 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
Rust
- No RFCs entered Final Comment Period this week.
Cargo
[disposition: merge] Allow build scripts to report error messages through cargo::error
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: Allow boolean literals as cfg predicates
- [new] Expose std support via --print
- [new] RFC: Give users control over
feature unification
- [new] Trusted Publishing Support on Crates.io
Upcoming Events
Rusty Events between 2024-09-18 - 2024-10-16 🦀
Virtual
- 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-25 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2024-09-26 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-09-26 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-10-02 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 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
- 2024-10-10 | Virtual (Barcelona, ES) | BcnRust + Codurance
- 2024-10-10 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-10-10 - 2024-10-11 | Virtual and In-Person (Vienna, AT) | Euro Rust
- 2024-10-16 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
Africa
- 2024-10-05 | Kampala, UG | Rust Circle Kampala
- 2024-10-09 | Subang Jaya / Kuala Lumpur, Selangor, MY | Rust Malaysia
Asia
- 2024-09-21 | Bangalore/Bengaluru, IN | Rust Bangalore
- 2024-09-24 | Tokyo, JP | Tokyo Rust Meetup
Europe
- 2024-09-18 | Moravia, CZ | Rust Moravia
- 2024-09-18 | Vienna, AT + Virtual | Linux Plumbers Conference
- 2024-09-20 | Hamburg, DE | Code.Talks
- 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-24 | Zagreb, HR | impl Zagreb for 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
- 2022-10-03 | Nürnberg, DE | Rust Nurnberg DE
- 2024-10-03 | Oslo, NO | Rust Oslo
- 2024-10-09 | Reading, UK | Reading Rust Workshop
- 2024-10-10 - 2024-10-11 | Virtual and In-Person (Vienna, AT) | Euro Rust
- 2024-10-15 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
North America
- 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 | Boston, MA, US | SquiggleConf
- 2024-10-03 | St. Louis, MO, US | STL Rust
- 2024-10-04 | Mexico City, DF, MX | Rust MX
- 2024-10-08 | Detroit, MI, US | Detroit Rust
- 2024-10-15 | Virtual (Washington, DC, US) | Rust DC
- 2024-10-16 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver 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
[Rust] is a conspiracy to popularize programing language concepts from the 80s
llogiq is quite thankful to himself 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