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
Project/Tooling Updates
- Meilisearch 1.4 - new features, including custom text separators, and user-definded dictionary
- cargo-binstall Release v1.4.1
Observations/Thoughts
- Interacting with AWS IAM services using the Rust SDK and stand-alone CLI
- My Pure Rust Wishlist
- Qualifying Rust without forking
- Why Not Rust Crypto?
- Eyra is an interesting Rust project
- Generic trait methods and new auto traits
- Rust for Mission Critical Applications
- Polonius revisited, part 1
- Scaling Rust Adoption Through Training
Rust Walkthroughs
- Hello, Rust!
- Rust: The joy of safe zero-copy parsers
- Cross-compiling Rust on Github Actions
- [video] Build Your First Game in Bevy and Rust
- [video]
no_std: ?no_problem
Research
Miscellaneous
- Using Kani to write and validate Rust code with ChatGPT
- Logging in Rust - How to Get Started
- Profiling with perf and DHAT on Rust code in Linux
- Adding runtime benchmarks to the Rust compiler benchmark suite
- ESP Embedded Rust: Multithreading with FreeRTOS Bindings
- A JVM in Rust part 6 - Methods and exceptions
- [audio] RustShip: Atuin - Shell history sync, search and backup with Ellie Huxtable
Crate of the Week
This week's crate is async_fn_traits, a crate with async function traits to enable using higher ranked trait bounds in async functions.
Thanks to kornel for the 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 - add multiple insert and delete functionality for in-memory cache
- Hyperswitch - add metrics to cache invalidation miss
- Hyperswitch - separate payments_session from payments core
- nix-rust - next generation maintainers
- DeepCausality - Increase Test Coverage
- DeepCausality - Polish documentation
- rust-libp2p - replace
custom-clippy
alias with workspace-wide[lints]
configuration - rust-libp2p - Prefer tokio runtime everywhere
- rust-libp2p - misc: make
RwStreamSink
an implementation detail of the memory transport - time - Missing panic condition on API docs
- time - Add comparison to chrono to the docs
- time - The Book is hardly readable
- Ockam -
ockam status
clap command should provide more user friendly information when a user is not enrolled - Ockam -
ockam status
clap command should provide more user friendly information when a user is enrolled - Ockam - Improve
ockam enroll ----help
clap command text by adding doc comment forverbose
flag
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
402 pull requests were merged in the last week
- breaking change: Validate crate name in
--extern
- add support for GNU/Hurd
- enable ASAN/LSAN/TSAN for *-apple-ios-macabi
- raise minimum supported Apple OS versions
rustc_target/loongarch
: Fix passing of transparent unions with only one non-ZST memberrustc_target/riscv
: Fix passing of transparent unions with only one non-ZST memberrustc_hir_analysis
: add a helper to check function the signature mismatches- account for nested
impl Trait
in TAIT - add minimal std implementation for UEFI
- add OwnedTargetMachine to manage llvm:TargetMachine
- add Zba, Zbb, and Zbs as target features for riscv64-linux-android
- add initial libstd support for Xous
- adjust
ConstValue::Slice
to work for arbitrary slice types - adjust how closure/generator types are printed
- allow
-Z treat-err-as-bug=0
- allow anyone to set llvm-fixed-upstream
- allow higher-ranked fn sigs in
ValuePairs
- capture scrutinee of if let guards correctly
- check that closure/generator's interior/capture types are sized
- command: also print removed env vars
- correctly deny late-bound lifetimes from parent in anon consts and TAITs
- coverage: don't bother renumbering expressions on the Rust side
- coverage: fix an unstable-sort inconsistency in coverage spans
- coverage: remove debug code from the instrumentor
- dependencies: reduce the amount of crates pulling in atty
- detect cycle errors hidden by opaques during monomorphization
- diagnostics: avoid mismatch between variance index and hir generic
- do not create a DerefLen place for
Box<[T]>
- don't ICE when no bound vars found while doing closure hir type check
- don't complain on a single non-exhaustive 1-ZST
- don't modify libstd to dump rustc ICEs
- don't resolve generic impls that may be shadowed by dyn built-in impls
- enable -Zdrop-tracking-mir by default
- enable effects for libcore
- fall back to
_SC_NPROCESSORS_ONLN
ifsched_getaffinity
returns an empty mask - fall back to the unoptimized implementation in
read_binary_file
ifFile::metadata
lies - fix
ui-fulldeps --stage=1
with-Zignore-directory-in-diagnostics-source-blocks
- fix confusing let chain indentation in
rustc_resolve
- fix debug printing of tuple
- give FutureIncompatibilityReason variants more explicit names
- implement
Literal::byte_character
- implement
intercrate_ambiguity_causes
in the new solver - improve invalid UTF-8 lint by finding the expression initializer
- interpret: more consistently use ImmTy in operators and casts
- make unsized casts illegal
- match on elem first while building move paths
- more accurate suggestion for
self.
andSelf:
: - move
DepKind
torustc_query_system
and define it asu16
- pass name of object file to LLVM so it can correctly emit
S_OBJNAME
in pdb files on Windows - point at cause of expectation of
break
value when possible - prevent promotion of const fn calls in inline consts
- suggest desugaring to return-position
impl Future
when anasync fn
in trait fails an auto trait bound - tweak expected message to explain what it's actually signifying
- miri: GC the Stacked Borrows allocation history
- miri: deprecate -Zmiri-disable-abi-check
- miri: implement
llvm.ctpop.v*
intrinsics - miri: issue discovered in TB: spurious reads are not (yet) possible in a concurrent setting
- miri: move
llvm.x86.*
shims intoshims::x86
and implement_addcarry_u32
and_subborrow_u{32,64}
- open the FileEncoder file for reading and writing
- simplify/Optimize FileEncoder
- avoid overflow in
IoSlice::advance_slices
- call
panic_display
directly inconst_panic_fmt
- implement
cstr_count_bytes
- panic when encountering an illegal cpumask in
thread::available_parallelism
- add the
cfg_match!
macro - cargo: add some enhancements to
cargo clean
- cargo: better suggestion for redundant mode in build and install commands
- cargo: buffer console status messages
- cargo: cargo add displays either feature list or summarized count
- cargo: doc: mention unstable flag
-Z asymmetric-token
- cargo: fix spurious errors with networking tests
- cargo: fix: copy PDBs for EFI targets
- cargo: fix: use channel-specific link for registry auth error
- cargo: infra: add auto-trigger rules for new labels
- cargo: more specific registry index not found msg
- cargo: shortest path
- rustdoc-search: add support for type parameters
- rustdoc: correctly render the return type of cross-crate async fns
- rustdoc: custom code classes in docs warning
- rustfmt: bugfix/comment duplication
- clippy:
redundant_guards
: lint if the pattern is on the left side - clippy: change defaults of
accept-comment-above-statement
andaccept-comment-above-attributes
- clippy: fix false positive with
needless_raw_string_hashes
- clippy: fix
cast_lossless
with macro call - clippy: fix mutably used async function argument in closure for
needless_pass_by_ref_mut
- clippy: fixed caused by moving &mut reference inside of a closure
- clippy: prevent ice when threshold is 0 and
enum
has no variants - clippy: remove most usage of
hir_ty_to_ty
- rust-analyzer: add
unused_variables
native diagnostic - rust-analyzer: add option to show full function signatures in completion docs
- rust-analyzer: deunwrap
add_missing_match_arms
- rust-analyzer: do not resolve inlayHint.textEdit for VSCode client
- rust-analyzer: bool to
enum
assist - rust-analyzer: fix autoimport does nothing when importing trait that is as
_
imports - rust-analyzer: fix inlining closures from local variables and functions
- rust-analyzer: give
unmerge_use
a label explaining what it will affect
Rust Compiler Performance Triage
A very quiet week with the only large change in performance being improvements brought on by @saethlin's work on cleaning up the FileEncoder
used in various places like rustc_metadata
and rustc_serialize
.
Triage done by @rylev. Revision range: af78bae..27b4eb9
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.6% | [0.3%, 1.1%] | 15 |
Regressions ❌ (secondary) |
2.0% | [0.2%, 7.1%] | 32 |
Improvements ✅ (primary) |
-0.7% | [-1.3%, -0.3%] | 70 |
Improvements ✅ (secondary) |
-0.9% | [-3.5%, -0.2%] | 31 |
All ❌✅ (primary) | -0.4% | [-1.3%, 1.1%] | 85 |
2 Regressions, 3 Improvements, 4 Mixed; 0 of them in rollups 73 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] Rework negative coherence to properly consider impls that only partly overlap
New and Updated RFCs
- [new] Lifetime Capture Rules 2024
- [new] RFC:
typed-context-injection
- [new] RFC: Precise Pre-release
cargo update
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-09-27 - 2023-10-25 🦀
Virtual
- 2023-10-03 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-10-04 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-10-04 | Virtual (Various) | Ferrous Systems
- 2023-10-04 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-10-05 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-10-07 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2023-10-10 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-10-10 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-10-11| Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2023-10-12 - 2023-10-13 | Virtual (Brussels, BE) | EuroRust
- 2023-10-12 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 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
Asia
- 2023-10-03 | Taipei, TW | WebAssembly and Rust Meetup (Wasm Empowering AI)
Europe
- 2023-09-28 | Berlin, DE | React Berlin
- 2023-09-28 | Madrid, ES | MadRust
- 2023-09-28 | Paris, FR | Paris Scala User Group (PSUG)
- 2023-09-28 | Vienna, AT | Rust Vienna
- 2023-09-30 | Saint Petersburg, RU | Rust Saint Petersburg meetups
- 2023-10-04 | Lyon, FR | Rust Lyon
- 2023-10-10 | Berlin, DE | OpenTechSchool Berlin
- 2023-10-12 - 2023-10-13 | Brussels, BE | EuroRust
- 2023-10-12 | Brussels, BE | Rust Aarhus
- 2023-10-12 | Reading, UK | Reading Rust Workshop
- 2023-10-17 | Helsinki, FI | Finland Rust-lang Group
- 2023-10-17 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-10-25 | Dublin, IE | Rust Dublin
North America
- 2023-09-27 | Austin, TX, US | Rust ATX
- 2023-09-28 | Boulder, CO, US | Solid State Depot - The Boulder Makerspace
- 2023-10-05 | Mountain View, CA, US | Mountain View Rust Meetup
- 2023-10-11 | Boulder, CO, US | Boulder Rust Meetup
- 2023-10-12 | Lehi, UT, US | Utah Rust
- 2023-10-17 | San Francisco, CA, US | San Francisco Rust Study Group
- 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
Oceania
- 2023-09-28 | 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
The problem with Rust it appears,
that it leaves programmers in tears
if they have to go back
to languages that lack
in short they've got feature-arrears.
Thanks to Frank Steffahn 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