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
- Announcing Rust 1.83.0
- Rustc Trait System Refactor Initiative Update: Stabilizing
-Znext-solver=coherence
- The wasm32-wasip2 Target Has Reached Tier 2 Support
- 2024 Annual State of Rust Survey
Project/Tooling Updates
- Measuring and Improving rustls's Multithreaded Performance
- Bevy 0.15
- Leptos 0.7.0
- Advent of Rust 2024
- Introducing Uniffi for React Native: Rust-Powered Turbo Modules
- Revisiting Hubris appconfigs
- RVKMS and Rust KMS bindings
- NonStop discussion around adding Rust to Git
- Rust's incremental compiler architecture
- What's new in SeaStreamer 0.5
Observations/Thoughts
- Breakage! in the Cargo.toml — How Rust Package Features Work (And Break)
- Streaming Audio APIs in Rust pt. 4: The Model
- [audio] GitButler with Scott Chacon and Kiril Videlov
- [audio] A different serde
Rust Walkthroughs
- Developing a Zellij Rust plugin
- Optimization adventures: making a parallel Rust workload even faster with data-oriented design (and other tricks)
- Designing a const
array::from_fn
in stable Rust - Implementing async APIs for microcontroller peripherals
- Rust 🦀 on the RP2040
- Building a real-time chat using WebSockets over HTTP/2 streams
- Running Bevy in a Web Worker with Rendering and Physics!
- Packaging a Rust library as an XCFramework for iOS
Crate of the Week
This week's crate is augurs, a time-series toolkit for Rust with bindings to JS & Python.
Thanks to Ben Sully 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.
- RustWeek 2025 | Closes 2025-01-12 | Utrecht, The Netherlands | Event date: 2025-05-13
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
488 pull requests were merged in the last week
rust_analyzer_settings
: force use of 'nightly' toolchain- add
needs-target-has-atomic
directive - allow injecting a profiler runtime into
#![no_core]
crates - bail on more errors in dyn ty lowering
- better diagnostic for fn items in variadic functions
- changes old intrinsic declaration to new declaration
- check
xform_ret_ty
for WF in the new solver to improve method winnowing - check let source before suggesting annotation
- check local cache even if global is usable
- cleanup: delete
//@ pretty-expanded
directive - constify
Drop
andDestruct
- coverage: store coverage source regions as
Span
until codegen - coverage: use a query to identify which counter/expression IDs are used
- delay a bug when encountering an impl with unconstrained generics in
codegen_select
- disable
avr-rjmp-offset
on Windows for now - do not call
extern_crate
on current trait on crate mismatch errors - do not constrain infer vars in
find_best_leaf_obligation
- do not create trait object type if missing associated types
- do not unify dereferences of shared borrows in GVN
- don't type error if we fail to coerce
Pin<T>
because it doesnt contain a ref - eliminate magic numbers from expression precedence
- enable
-Zshare-generics
forinline(never)
functions - ensure JSON-defined targets are consistent
- fast-reject: add depth check
- fix ICE when promoted has layout size overflow
- fix
-Zdump-mir-dataflow
- fix
clobber_abi
in RV32E and RV64E inline assembly - fix confusing diagnostic for reserved
##
- fix handling of x18 in AArch64 inline assembly on ohos/trusty or with -Zfixed-x18
- gce: fix
typing_mode
mismatch - get rid of HIR const checker
- improve span handling in
parse_expr_bottom
- improvements on initial sysroot and libdir finding logics
- make
adjust_fulfillment_errors
work withHostEffectPredicate
andconst_conditions
- make
compare_impl_item
into a query - only error raw lifetime followed by
\'
in edition 2021+ - only ignore windows-gnu in avr-jmp-offset
- print generated doc paths
- properly pass linker arguments that contain commas
- respect verify-llvm-ir option in the backend
- robustify and genericize return-type-notation resolution in
resolve_bound_vars
- show
forbidden_lint_groups
in future-compat reports - support
clobber_abi
in AVR inline assembly - support input/output in vector registers of PowerPC inline assembly
- support predicate registers (clobber-only) in Hexagon inline assembly
- support revealing defined opaque post borrowck
- target
check_consistency
: ensure target feature string makes some basic sense - the emscripten OS no longer exists on non-wasm targets
- use edition of
macro_rules
when compiling the macro - use stores of the correct size to set discriminants
- miri: implement
TlsFree
- miri: filesystem support for solarish: stat
- miri: move FdTable to a common location and split off Unix behavior
- miri: remove ctrlc, unused
- stop cloning
Context
so much - recover some lost performence
- stabilize
const_maybe_uninit_write
- stabilize
extended_varargs_abi_support
- stabilize
ptr::fn_addr_eq
- stabilize unsigned and float variants of
num_midpoint
feature thread::available_parallelism
for wasm32-wasip1-threads- add
BTreeSet
entry APIs to matchHashSet
- btree: add
{Entry,VacantEntry}::insert_entry
- fix chaining
carrying_add
s - mark
slice::copy_from_slice
unstably const - std: expose
const_io_error!
asconst_error!
- std: refactor
pthread
-based synchronization - fix and undeprecate
home_dir()
- support ranges in
<[T]>::get_many_mut()
- cargo: toml: Allow adding/removing from cargo scripts
- cargo: build-std: always link to std when testing proc-macros
- cargo: fix: Migrate cargo script manifests across editions
- cargo: build-std: download deps first
- cargo: pgo: determine test runnability at compile time
- cargo: pgo: ensure PGO works
- cargo: pgo: only run on nightly
- cargo: add future-incompat warning against keywords in cfgs and add raw-idents
- cargo: fix: remove default registry reference in
info
cmd docs - cargo: git-fetch-with-cli: set
GIT_DIR
for bare repository compatibility - cargo: test:
requires
attribute accepts string literals for cmds - rustdoc-json: include safety of
static
s - rustdoc: Change impl items indent
- bindgen: add support for unsafe extern blocks
- bindgen: consolidate dependency version management
- bindgen: extend parse callbacks to expose discovered composite types and aliases
- bindgen: generate C-String literals
c"example"
instead of unsafe code - bindgen: improve debug str generator
- bindgen: introduce
--rust-edition
- bindgen: use v2 cargo resolver
- bindgen: wrap the array representation of opaque types in a
#[repr(C)] struct
- rustfmt: use preinterned
path
symbol - clippy:
bad_bit_mask
Fix false positive on proc macros - clippy:
doc_nested_refdefs
: new lint for suspicious list syntax - clippy: add more cases to the
useless_conversion
lint - clippy: add new
literal_string_with_formatting_args
lint - clippy: fix
needless_match
FP on if-lets - clippy: fix
shadow_unrelated
's behaviour with closures - clippy: fix lifetimes elision suggestion in where clauses
- clippy: fix: use
multipart_suggestion
forderivable_impls
- clippy: handle repetition of associated constant constraint as well
- rust-analyzer: advertise completions and inlay hints resolve server capabilities based on the client capabilities
- rust-analyzer: fix debug configuration querying not inheriting environment
- rust-analyzer: fix syntax fixup inserting unnecessary semicolons
- rust-analyzer: re-add
rust-analyzer.cargo.sysrootQueryMetadata
- rust-analyzer: remove redundant associated type bounds from
dyn TypeFolder
Rust Compiler Performance Triage
Busy week with more PRs impacting performance than is typical. Luckily performance improvements outweighed regressions in real world benchmarks with the largest single performance gain coming from a change to no longer unconditionally do LLVM IR verification in debug builds which was just wasted work.
Triage done by @rylev. Revision range: 7db7489f..490b2cc0
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.5% | [0.2%, 1.9%] | 58 |
Regressions ❌ (secondary) |
1.1% | [0.2%, 5.1%] | 85 |
Improvements ✅ (primary) |
-2.3% | [-8.2%, -0.2%] | 116 |
Improvements ✅ (secondary) |
-2.5% | [-8.9%, -0.1%] | 55 |
All ❌✅ (primary) | -1.4% | [-8.2%, 1.9%] | 174 |
6 Regressions, 6 Improvements, 5 Mixed; 5 of them in rollups 49 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
- [disposition: merge] crates.io: Trusted Publishing Support
Tracking Issues & PRs
Rust
- [disposition: merge] Fix ICE when multiple supertrait substitutions need assoc but only one is provided
- [disposition: merge] rework winnowing to sensibly handle global where-bounds
- [disposition: merge] Always display first line of impl blocks even when collapsed
- [disposition: merge] Tracking Issue for
const_nonnull_new
- [disposition: merge] Lint on combining
#[no_mangle]
and#[export_name]
- [disposition: merge] Add Extend impls for tuples of arity 1 through 12
- [disposition: merge] [discussion]
ErrorKind::FilesystemQuotaExceeded
fromio_error_more
- [disposition: merge] [discussion]
ErrorKind::CrossesDevices
fromio_error_more
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team Proposals 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
Upcoming Events
Rusty Events between 2024-12-04 - 2025-01-01 🦀
Virtual
- 2024-12-05 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-12-05 | Virtual (Miami, FL) | Miami Java User Group Events
- 2024-12-06 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2024-12-07 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2024-12-08 | Virtual (Tel Aviv-Yafo, IL) | Rust 🦀 TLV
- 2024-12-10 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-12-11 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2024-12-12 | Hybrid: In-Person and Virtual (Seattle, WA, US) | Seattle Rust Meetup
- 2024-12-12 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-12-12 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-12-13 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2024-12-17 | Virtual (San Francisco, CA, US) | Blockchain Center SF
- 2024-12-17 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2024-12-17 | Virtual (Washington, DC, US) | Rust DC
- 2024-12-17 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-12-19 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-12-19 | Virtual (Mexico City, DF, MX) | Rust MX
- 2024-12-20 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2024-12-24 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-12-26 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
Africa
- 2024-12-10 | Johannesburg, ZA | Johannesburg Rust Meetup
Asia
- 2024-12-14 | Bangalore/Bengaluru, IN | Rust Bangalore
Europe
- 2024-12-04 | Girona, ES | Rust Girona
- 2024-12-04 | Köln, DE | Rust Cologne
- 2024-12-04 | Oxford, UK | Oxford Rust Meetup Group
- 2024-12-04 | Paris, FR | Rust Paris
- 2024-12-05 | Gdansk, PL | Rust Gdansk
- 2024-12-05 | Zlin, CZ | Rust Moravia
- 2024-12-06 | Moscow, RU | RustCon RU
- 2024-12-11 | Reading, UK | Reading Rust Workshop
- 2024-12-12 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2024-12-12 | München, DE | Rust Munich
- 2024-12-12 | Vienna, AT | Rust Vienna
- 2024-12-17 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
North America
- 2024-12-05 | Montréal, QC, CA | Rust Montréal
- 2024-12-05 | St. Louis, MO, US | STL Rust
- 2024-12-10 | Ann Arbor, MI, US | Detroit Rust
- 2024-12-12 | Hybrid: In-Person and Virtual (Seattle, WA, US) | Seattle Rust User Group
- 2024-12-12 | Mountain View, CA, US | Hacker Dojo
- 2024-12-16 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2024-12-17 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-12-26 | Mountain View, CA, US | Hacker Dojo
Oceania
- 2024-12-04 | Sydney, AU | Rust Sydney
- 2024-12-08 | Canberra, AU | Canberra Rust User Group
- 2024-12-16 | Collingwood, AU | Rust Melbourne
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
"self own" sounds like a rust thing
Thanks to Jacob Pratt 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