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
- On Rust in enterprise kernels
- FFI type mismatches in Rust for Linux
- Zapping pointers out of thin air
- Using LKMM atomics in Rust
- "pigg" (the Raspberry Pi GPIO GUI) 0.4.0 released
Observations/Thoughts
- Why
Pin
is a part of trait signatures (and why that's a problem) - The
Overwrite
trait andPin
- Improve an algorithm performance step by step
- Replacing nginx with axum
- An experiment in async Rust
- Designing A Fast Concurrent Hash Table
- Rethinking Builders… with Lazy Generics
- IPC in Rust
- Serde Trait - Part 3: Deserialization
- Memory for Nothing: Why Vec<usize> is (probably) a bad idea
- Upgrade the Logging in your Rust Tests
- Nine Rules for Running Rust on Embedded Systems
- Why Rust is taking the data engineering world by storm
Rust Walkthroughs
Crate of the Week
This week's crate is bacon, a terminal application to run your cargo tasks on change in background.
Thanks to Denys Séguret 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.
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
468 pull requests were merged in the last week
- reserve guarded string literals (RFC #3593)
- ABI: pass aggregates by value on AIX
codegen_ssa
: consolidate tied target checksrustc_target
: Add sme-b16b16 as an explicit aarch64 target feature- add
&pin (mut|const) T
type position sugar - add suggestion for removing invalid path sep
:
: in fn def - also use outermost const-anon for impl items in
non_local_defs
lint - check ABI target compatibility for function pointers
- don't assume traits used as type are trait objs in 2021 edition
- dont ICE when encountering post-mono layout cycle error
- emit an error for unstable attributes that reference already stable features
- fix
clobber_abi
and disallow SVE-related registers in Arm64EC inline assembly - improve error messages for
C-cmse-nonsecure-entry
functions - introduce SolverRelating type relation to the new solver
- make
unused_parens's
suggestion considering expr's attributes - move dummy commit logic into
x86_64-gnu-llvm-18
- move polarity into
PolyTraitRef
rather than storing it on the side - precise capturing in traits
- shallowly match opaque key in storage
- support
clobber_abi
in MSP430 inline assembly - suppress import errors for traits that couldve applied for method lookup error
- use throw intrinsic from stdarch in wasm libunwind
- miri: do not store synchronization primitive IDs in adressable memory
- miri: ensure that a macOS
os_unfair_lock
that is moved while being held is not implicitly unlocked - miri: epoll event adding: no need to join, there's no old clock here
- miri: fix behavior of
release_clock()
- miri: fix over synchronization of epoll
- miri: fixed
pthread_getname_np
impl for glibc - miri: fixed get/set thread name implementations for macOS and FreeBSD
- miri: use new
check_min_arg_count
helper in more places - impossible obligations fast path
- remove unnecessary sorts in
rustc_hir_analysis
- stabilise
const_char_encode_utf8
- stabilise
const_make_ascii
- stabilize
Pin::as_deref_mut()
- stabilize
ci_rustc_if_unchanged_logic
test - stabilize
const_option
- stabilize
const_result
- stabilize
debug_more_non_exhaustive
- stabilize
duration_consts_float
- stabilize const
ptr::write*
andmem::replace
- stabilize const
{slice,array}::from_mut
- optimize
escape_ascii
using a lookup table - migrate lib's
&Option<T>
intoOption<&T>
- intrinsics fmuladdf{32,64}: expose llvm.fmuladd.* semantics
- add
#[track_caller]
to allocating methods ofVec
&VecDeque
- core/net: add
Ipv[46]Addr::from_octets, Ipv6Addr::from_segments
- decouple WASIp2 sockets from WasiFd
- fix bug where
option_env!
would returnNone
when env var is present but not valid Unicode - implemented
FromStr
forCString
andTryFrom<CString>
forString
- library: const-stabilize
MaybeUninit::assume_init_mut
- std: fix stdout-before-main
- hashbrown: ci: test the MSRV with minimal dependency versions
- hashbrown: revert "feat: borsh serde"
- cargo: complete: Don't complete files for any value
- cargo: git: dont fetch tags by default
- cargo: resolver: share conflict cache between activation retries
- cargo: add more SAT resolver tests
- cargo: docs: tools should only interpret a line starting with
{
as JSON - cargo: feat: add custom completer for completing registry name
- cargo: fix panic when running cargo tree on a package with a cross compiled bindep
- cargo: fix: avoid inserting duplicate
dylib_path_envvar
when callingcargo run
recursively - cargo: improve resolver speed
- cargo: initial version of checksum based freshness
- cargo: remove the support for
Cargo.toml
of the cargo-script - cargo: support package selection options like
--exclude
incargo publish
- rustdoc-json: change item ID's repr from a string to an int
- rustdoc: add space between
struct
fields and their descriptions - rustfmt: hint which
style_edition
to use instead of version - clippy:
implicit_saturating_sub
: fix suggestion with a less volatile approach - clippy:
module_name_repetitions
: don't warn if the item is in a private module - clippy: add
manual_ignore_cast_cmp
lint - clippy: check
MethodCall
/Call
arg count earlier or at all - clippy: check for needless raw strings in
format_args!()
template as well - clippy: don't warn on proc macro generated code in
needless_return
- clippy: fix
large_stack_arrays
triggering when nesting const items - clippy: fix lint
manual_slice_size_calculation
when a slice is ref more than once - clippy: fix span issue on
implicit_saturating_sub
- clippy: mark
unnecessary_first_then_check
andbyte_char_slices
asApplicable
- clippy: move
clippy::module_name_repetitions
torestriction
(frompedantic
) - clippy: move
too_long_first_doc_paragraph
tonursery
- clippy: only emit
manual_c_str_literals
in ≥ Edition 2021 - clippy: use correct std/core prefix in lint output
- rust-analyzer: add support for LLDB-DAP
- rust-analyzer: correctly parse
use
in generic parameters - rust-analyzer: do not consider match/let/ref of place that evaluates to ! to diverge, disallow coercions from them too
- rust-analyzer: handle self-param outside of methods when renaming
- rust-analyzer: highlight exit points of async blocks
- rust-analyzer: respect
references.exclude_tests
in call-hierarchy - rust-analyzer: fix panic when json project has relative buildfile paths
- rust-analyzer: comment out cast checks for unknown ptr kind
- rust-analyzer: do not consider mutable usage of deref to
*mut T
asderef_mut
- rust-analyzer: fix
prettify_macro_expansion()
when the node isn't the whole file - rust-analyzer: include description in label details when detail field is marked for …
- rust-analyzer: incorrect autofix for missing wrapped unit in return expr
- rust-analyzer: join rustfmt overrideCommand with project root
- rust-analyzer: hir-ty: change
struct
+enum
variant constructor formatting - rust-analyzer: lsp: fix
completion_item something_to_resolve
not being a latch to true - rust-analyzer: run subprocesses async in vscode extension
- rust-analyzer: skip
#[test_case]
expansion
Rust Compiler Performance Triage
No major changes this week.
Triage done by @simulacrum. Revision range: e6c46db4..5ceb623a
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
- [disposition: merge] stabilize Strict Provenance and Exposed Provenance APIs
- [disposition: merge] make unsupported_calling_conventions a hard error
- [disposition: merge] Decide on name for
derive(SmartPtr)
- [disposition: merge] Stabilize
shorter_tail_lifetime
- [disposition: merge] Finish stabilization of
result_ffi_guarantees
- [disposition: merge] Implement edition 2024 match ergonomics restrictions
Cargo
Language Team
- No Cargo 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: No (opsem) Magic Boxes
- [new]
#[inline(required)]
- [new] RFC: introduce the flavor syntactic design pattern
Upcoming Events
Rusty Events between 2024-10-16 - 2024-11-13 🦀
Virtual
- 2024-10-16 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-10-17 | Virtual | Women in Rust
- 2024-10-17| Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-10-17 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-10-22 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-10-24 | Virtual | Women in Rust
- 2024-10-24 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-10-26 | Virtual (Gdansk, PL) | Stacja IT Trójmiasto
- 2024-10-29 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-10-31| Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2022-10-31 | Virtual (Nürnberg, DE) | Rust Nurnberg DE
- 2024-11-07 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-11-12 | Virtual (Dallas, TX, US) | Dallas Rust
Africa
- 2024-11-02 | Kampala, UG | Rust Circle Kampala
Asia
- 2024-10-17 - 2024-10-18 | Beijing, CN | Global Open-Source Innovation Meetup (GOSIM)
- 2024-10-19 | Bangalore/Bengaluru, IN | Rust Bangalore
Europe
- 2024-10-16 | Manchester, UK | Rust Manchester
- 2024-10-17 | Barcelona, ES | BcnRust
- 2024-10-17 | Bern, CH | Rust Bern
- 2024-10-17 | Gdańsk, PL | Rust Gdansk
- 2024-10-22 | London, UK | Rust London User Group
- 2024-10-22 | Warsaw, PL | Rust Warsaw
- 2024-10-26 | Stockholm, SE | Stockholm Rust
- 2024-10-28 | Paris, FR | Rust Paris
- 2024-10-29 | Aarhus, DK | Rust Aarhus
- 2024-10-30 | Hamburg, DE | Rust Meetup Hamburg
- 2024-10-31 | Berlin, DE | OpenTechSchool Berlin + Rust Berlin
- 2024-11-06 | Oxford, UK | Oxford Rust Meetup Group
- 2024-11-06 | Paris, FR | Paris Rustaceans
North America
- 2024-10-16 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-10-17 | Chicago, IL, US | Deep Dish Rust
- 2024-10-17 | Virtual and In-Person (Seattle, WA, US) | Seattle Rust User Group
- 2024-10-19 | Cambridge, MA, US | Boston Rust Meetup
- 2024-10-23 | Austin, TX, US | Rust ATX
- 2024-10-27 | Cambridge, MA, US | Boston Rust Meetup
- 2024-10-28 | Boulder, CO, US | Boulder Rust Meetup
- 2024-10-28 | Ferndale, MI, US | Detroit Rust
- 2024-10-28 | Minneapolis, MN US | Minneapolis Rust Meetup
- 2024-10-29 | Nashville, TN, US | Music City Rust Developers
- 2024-11-04 | Brookline, MA, US | Boston Rust Meetup
- 2024-11-06 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-11-07 | St. Louis, MO, US | STL Rust
- 2024-11-12 | Ann Arbor, MI, US | Detroit Rust
Oceania
- 2024-10-28 | Melbourne, VIC, AU | Rust Melbourne
- 2024-10-29 | Canberra, ACT, AU | Canberra Rust User Group (CRUG)
- 2024-10-31 | Auckland, NZ | Rust AKL
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
We'd have buttons on the screen to control the fans of the car. I had to write a lot of code before I could compile it all, a big jenga tower. But once it compiled, the fans started to work! Very impressed.
– Julius Gustavsson on the Tweedegolf blog
Thanks to scottmcm 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