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 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.
Updates from Rust Community
Official
Foundation
Newsletters
Project/Tooling Updates
- Announcing EtherCrab, a Rust implementation of the EtherCAT industrial automation protocol
- rust-analyzer changelog #203
Observations/Thoughts
- Why async Rust?
- Compile Times and Code Graphs
- Containerize Rust applications on Ubuntu & Alpine, with GitHub Actions
Rust Walkthroughs
- A type level contains operation for heterogeneous list using associated types
- Using GraphQL in Rust
- Writing parsers in Winnow
Research
- Yuga: Automatically Detecting Lifetime Annotation Bugs in the Rust Language
- Fast Summary-based Whole-program Analysis to Identify Unsafe Memory Accesses in Rust
Miscellaneous
- Eurorust reflections
- EuroRust 2023 Reflections: What's a Conference For?
- [audio] RustShip: Graphite - Raster and Vector Graphics in Rust
Crate of the Week
This week's crate is rinf, a library to write Rust in Flutter.
Thanks to Kim Dong-Hyun for the self-suggestion!
Please submit your suggestions and votes for next week!
Call for Participation
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.
- Hyperswitch (Hacktoberfest) - [OpenNode] Currency Unit Conversion
- Hyperswitch (Hacktoberfest) - [Stax] Currency Unit Conversion
- Hyperswitch (Hacktoberfest) - [ACI] Currency Unit Conversion
- Ockam - Make
ockam space show
(no args) interactive by asking the user to choose from a list of space names to show (tuify) - Ockam - Improve
ockam tcp-inlet delete --help
text (clap
command) - Ockam - Enroll "email: '+' character not allowed"
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
409 pull requests were merged in the last week
const_eval
: allow function pointer signatures containing &mut T in const contextsrustc_hir_pretty
cleanups- add
Config::hash_untracked_state
callback - add the V (vector) extension to the riscv64-linux-android target spec
- also consider call and yield as MIR SSA
- broaden the consequences of recursive TLS initialization
- cleanup
rustc_features
some more - compute NLL loan scopes using the polonius model
- const-eval: allow calling functions with targat features disabled at compile time in WASM
- const-eval: make misalignment a hard error
- coverage: separate initial span extraction from span processing
- detect ruby-style closure in parser
- do not check for impossible predicates in const-prop lint
- don't UB on dangling ptr deref, instead check inbounds on projections
- exhaustiveness: rework constructor splitting
- explicitly handle auto trait leakage in coherence
- fix exit status / wait status on non-Unix
cfg(unix)
platforms - fix overflow checking in range patterns
- handle several
#[diagnostic::on_unimplemented]
attributes correctly - implement
-Clink-self-contained=-linker
opt out - improve check-cfg diagnostics
- improve handling of assertion failures with very long conditions
- in smir use
FxIndexMap
to store indexed ids - linker: also pass debuginfo compression flags
- make "request changes" reviews apply
S-waiting-on-author
- on type error involving closure, avoid ICE
- on type error of closure call argument, point at earlier calls that affected inference
- opt-dist: disable unused features for tabled crate
- pass rustc shim flags using environment variable
- prevent more spurious unreachable pattern lints
- prevent showing methods from blanket impls of not available foreign traits to show up in the search results
- prevent spurious
unreachable pattern
lints - relate alias ty with variance
- remove
DefiningAnchor::Bubble
from opaque wf check - show
enum
discriminant if a compatible repr is used - stabilize
async fn
and return-positionimpl Trait
in trait - structurally normalize for closure
- suggest adding
return
if the for semi which can coerce to the fn return type - suggest labeling block if
break
is in bare block - suggest trait bounds for used associated type on type param
- support AIX in Rust standard library
- use
PatKind::Error
when an ADT const value has violation - use env variable to control thread ids in
rustc_log
- add ability to get lines/filename for Span in smir
- miri: implement
llvm.x86.sse41.*
intrinsics - miri: make NaN generation non-deterministic
- copy 1-element arrays as scalars, not vectors
- optimize
librustc_driver.so
with BOLT - optimize file read in
Config::verify
- optimize zipping over array iterators
- stabilize
atomic_from_ptr
- stabilize
const_maybe_uninit_assume_init_read
- stabilize
{IpAddr, Ipv6Addr}::to_canonical
- impl Not, Bit{And,Or}{,Assign} for IP addresses
- impl Default for ExitCode
- add invariant to
Vec::pop
that len<
cap if pop successful - implement
BufRead
forVecDeque<u8>
- implement
OnceCell/Lock::try_insert()
- implement
slice::split_once
andslice::rsplit_once
- add explicit-endian
String::from_utf16
variants - implement FusedIterator for DecodeUtf16 when the inner iterator does
- implement
sys::args
for UEFI - inline
Bytes::next
andBytes::size_hint
- make
try_exists
returnOk(true)
for Windows Unix Sockets - mark
new_in
asconst
for BTree collections - regex-automata/meta: revert broadening of reverse suffix optimization
- regex-lite: tweak nest limit on stack overflow test
- regex: loosen ASCII compatible rules + improve reverse suffix optimization
- regex, regex-automata: fix compilation of doctests on 32-bit architectures
- regex-lite: fix compilation of doctests on 32-bit architectures
- regex: revert recent regex-syntax interval set optimizations
- cargo:
fix(install)
: Suggest an alternative version on MSRV failure - cargo: add detailed message when target folder path is invalid
- cargo: add package name and version to warning messages
- cargo: support
public
dependency configuration with workspace deps - rustfmt: support let-chains
- rustdoc-search: add impl disambiguator to duplicate assoc items
- rustdoc: hide
#[repr(transparent)]
if it isn't part of the public ABI - rustdoc: show crate name beside smaller logo
- clippy:
get_first
: lint on non-primitive slices - clippy:
manual_is_ascii_check
: Also check foris_ascii_hexdigt
- clippy:
unnecessary_lazy_eval
: reduce applicability if closure has return type annotation - clippy: fix ICE in internal author lint
- rust-analyzer: add
replace_is_ok_with_if_let_ok
assist - rust-analyzer: add
replace_is_some_with_if_let_some
assist - rust-analyzer: add diagnostics messages for chars and byte literal errors
- rust-analyzer: make cursor select at
_tmp
- rust-analyzer: string literals diagnose
Rust Compiler Performance Triage
Overall an interesting week performance wise, with small improvements to a vast
number of benchmarks seeming to outweigh an isolated set of (slightly) larger
regressions. It included a number of PRs regressed instruction counts but did
not matter for cycle times, plus one mysterious regression to check_match
and
mir_borrowck
from reworking constructor splitting (see report on PR 116391 for
details), and an awesome broad set of improvements from automatically inlining
small functions across crates (see report on PR 116505 for details).
Triage done by @pnkfelix. Revision range: 84d44dd1..b9832e72
4 Regressions, 1 Improvements, 4 Mixed; 3 of them in rollups 84 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: merge] 2024 Edition
Tracking Issues & PRs
- [disposition: merge] Tracking Issue for result_option_inspect
- [disposition: merge] Allow partially moved values in match
- [disposition: close]
read_dir
has unexpected behavior for""
- [disposition: merge] rustdoc: align stability badge to baseline instead of bottom
New and Updated RFCs
- [new] RFC: Superseding public/private dependencies
- [new] add float semantics RFC
- [new] Reserve
gen
keyword in 2024 edition and start an experiment implementation ofIterator
generators
Call 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:
- No RFCs issued a call for testing 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.
Upcoming Events
Rusty Events between 2023-10-18 - 2023-11-15 🦀
Virtual
- 2023-10-18 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-10-18 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-10-19 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-10-19 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-10-24 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-10-24 | Virtual (Washington, DC, US) | Rust DC
- 2023-10-31 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-11-01 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-11-01 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-11-02 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-11-09 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-11-15 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-11-15 | Virtual (Richmond, VA, US) | Linux Plumbers Conference
Asia
- 2023-10-18 | Tokyo, JP | Tokyo Rust Meetup
- 2023-10-20 | Singapore, SG | Rust Meetup Singapore
- 2023-10-21 | Pune, IN | Rust Pune
Europe
- 2023-10-19 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2023-10-19 | Wrocław, PL | Rust Wrocław
- 2023-10-20 | Saarbrücken, DE | Rust-Saar
- 2023-10-24 | Bucharest, RO | Rust Lang Bucharest Meetup
- 2023-10-25 | Dublin, IE | Rust Dublin
- 2023-10-25 | Paris, FR | Rust Paris
- 2023-10-25 | Zagreb, HR | impl Zagreb for Rust
- 2023-10-26 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-10-26 | Delft, NL | Rust Nederland
- 2023-10-26 | Lille, FR | Rust Lille
- 2022-10-30 | Stockholm, SE | Stockholm Rust
- 2023-11-01 | Cologne, DE | Rust Cologne
- 2023-11-07 | Brussels, BE | Rust Aarhus
- 2023-11-09 | Barcelona, ES | BcnRust
- 2023-11-09 | Reading, UK | Reading Rust Workshop
North America
- 2023-10-18 | Brookline, MA, US | Boston Rust Meetup
- 2023-10-19 | Mountain View, CA, US | Mountain View Rust Meetup
- 2023-10-19 | Nashville, TN, US | Music City Rust Developers
- 2023-10-19 | Seattle, WA, US | Seattle Rust User Group
- 2023-10-24 | Pasadena, CA, US | Pasadena Thursday Go/Rust
- 2023-10-25 | Austin, TX, US | Rust ATX
- 2023-10-25 | Chicago, IL, US | Deep Dish Rust
- 2023-11-04 | Boulder, CO, US | Boulder Rust Meetup
- 2023-11-15 | Richmond, VA, US + Virtual | Linux Plumbers Conference
Oceania
- 2023-10-17 | Christchurch, NZ | Christchurch Rust Meetup Group
- 2023-10-9 | Sydney, NSW, AU | Rust Sydney
- 2023-10-26 | 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
When your Rust build times get slower after adding some procedural macros:
We call that the syn tax 🦀
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