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
- rust-analyzer changelog #202
- Announcing: pid1 Crate for Easier Rust Docker Images - FP Complete
- bit_seq in Rust: A Procedural Macro for Bit Sequence Generation
- tcpproxy 0.4 released
- Rune 0.13
- Rust on Espressif chips - September 29 2023
- esp-rs quarterly planning: Q4 2023
- Implementing the
#[diagnostic]
namespace to improve rustc error messages in complex crates
Observations/Thoughts
- Safety vs Performance. A case study of C, C++ and Rust sort implementations
- Raw SQL in Rust with SQLx
- Thread-per-core
- Edge IoT with Rust on ESP: HTTP Client
- The Ultimate Data Engineering Chadstack. Running Rust inside Apache Airflow
- Why Rust doesn't need a standard div_rem: An LLVM tale - CodSpeed
- Making Rust supply chain attacks harder with Cackle
- [video] Rust 1.73.0: Everything Revealed in 16 Minutes
Rust Walkthroughs
- Let's Build A Cargo Compatible Build Tool - Part 5
- How we reduced the memory usage of our Rust extension by 4x
- Calling Rust from Python
- Acceptance Testing embedded-hal Drivers
- 5 ways to instantiate Rust structs in tests
Research
Miscellaneous
- Rust, Open Source, Consulting - Interview with Matthias Endler
- Edge IoT with Rust on ESP: Connecting WiFi
- Bare-metal Rust in Android
- [audio] Learn Rust in a Month of Lunches with Dave MacLeod
- [video] Rust 1.73.0: Everything Revealed in 16 Minutes
- [video] Rust 1.73 Release Train
- [video] Why is the JavaScript ecosystem switching to Rust?
Crate of the Week
This week's crate is yarer, a library and command-line tool to evaluate mathematical expressions.
Thanks to Gianluigi Davassi 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.
- Ockam - Make
ockam node delete
(no args) interactive by asking the user to choose from a list of nodes to delete (tuify) - Ockam - Improve
ockam enroll ----help
text by adding doc comment foridentity
flag (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
384 pull requests were merged in the last week
- formally demote tier 2 MIPS targets to tier 3
- add tvOS to
target_os
forregister_dtor
- linker: remove
-Zgcc-ld
option - linker: remove unstable legacy CLI linker flavors
non_lifetime_binders
: fix ICE in lint opaque-hidden-inferred-bound- add
async_fn_in_trait
lint - add a note to duplicate diagnostics
- always preserve DebugInfo in DeadStoreElimination
- bring back generic parameters for indices in
rustc_abi
and make it compile on stable - coverage: allow each coverage statement to have multiple code regions
- detect missing
=>
after match guard during parsing - diagnostics: be more careful when suggesting
struct
fields - don't suggest nonsense suggestions for unconstrained type vars in
note_source_of_type_mismatch_constraint
- dont call
mir.post_mono_checks
in codegen - emit feature gate warning for
auto
traits pre-expansion - ensure that
~const
trait bounds on associated functions are in const traits or impls - extend
impl
'sdef_span
to include its where clauses - fix detecting references to packed unsized fields
- fix fast-path for
try_eval_scalar_int
- fix to register analysis passes with -Zllvm-plugins at link-time
- for a single impl candidate, try to unify it with error trait ref
- generalize small dominators optimization
- improve the suggestion of
generic_bound_failure
- make FnDef 1-ZST in LLVM debuginfo
- more accurately point to where default return type should go
- move subtyper below
reveal_all
and changereveal_all
- only trigger
refining_impl_trait
lint on reachable traits - point to full
async fn
for future - print normalized ty
- properly export function defined in test which uses
global_asm!()
- remove Key impls for types that involve an AllocId
- remove is global hack
- remove the
TypedArena::alloc_from_iter
specialization - show more information when multiple
impl
s apply - suggest
pin!()
instead ofPin::new()
when appropriate - make subtyping explicit in MIR
- do not run optimizations on trivial MIR
- in smir
find_crates
returnsVec<Crate>
instead ofOption<Crate>
- add Span to various smir types
- miri-script: print which sysroot target we are building
- miri: auto-detect
no_std
where possible - miri: continuation of #3054: enable spurious reads in TB
- miri: do not use host floats in
simd_{ceil,floor,round,trunc}
- miri: ensure RET assignments do not get propagated on unwinding
- miri: implement
llvm.x86.aesni.*
intrinsics - miri: refactor dlsym: dispatch symbols via the normal shim mechanism
- miri: support getentropy on macOS as a foreign item
- miri: tree Borrows: do not create new tags as 'Active'
- add missing inline attributes to Duration trait impls
- stabilize
Option::as_
(mut_
)slice
- reuse existing
Some
s inOption::(x)or
- fix generic bound of
str::SplitInclusive
'sDoubleEndedIterator
impl - cargo:
refactor(toml)
: Make manifest file layout more consitent - cargo: add new package cache lock modes
- cargo: add unsupported short suggestion for --out-dir flag
- cargo: crates-io: add doc comment for
NewCrate struct
- cargo: feat: add
Edition2024
- cargo: prep for automating MSRV management
- cargo: set and verify all MSRVs in CI
- rustdoc-search: fix bug with multi-item impl trait
- rustdoc: rename
issue-\d+.rs
tests to have meaningful names (part 2) - rustdoc: Show
enum
discrimant if it is a C-like variant - rustfmt: adjust span derivation for const generics
- clippy:
impl_trait_in_params
now supports impls and traits - clippy:
into_iter_without_iter
: walk up deref impl chain to finditer
methods - clippy:
std_instead_of_core
: avoid lint inside of proc-macro - clippy: avoid invoking
ignored_unit_patterns
in macro definition - clippy: fix
items_after_test_module
for non root modules, add applicable suggestion - clippy: fix ICE in
redundant_locals
- clippy: fix: avoid changing drop order
- clippy: improve
redundant_locals
help message - rust-analyzer: add config option to use
rust-analyzer
specific target dir - rust-analyzer: add configuration for the default action of the status bar click action in VSCode
- rust-analyzer: do flyimport completions by prefix search for short paths
- rust-analyzer: add assist for applying De Morgan's law to
Iterator::all
andIterator::any
- rust-analyzer: add backtick to surrounding and auto-closing pairs
- rust-analyzer: implement tuple return type to tuple
struct
assist - rust-analyzer: ensure
rustfmt
runs when configured with./
- rust-analyzer: fix path syntax produced by the
into_to_qualified_from
assist - rust-analyzer: recognize custom main function as binary entrypoint for runnables
Rust Compiler Performance Triage
A quiet week, with few regressions and improvements.
Triage done by @simulacrum. Revision range: 9998f4add..84d44dd
1 Regressions, 2 Improvements, 4 Mixed; 1 of them in rollups
68 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] RFC: Remove implicit features in a new edition
Tracking Issues & PRs
- [disposition: merge] Bump
COINDUCTIVE_OVERLAP_IN_COHERENCE
to deny + warn in deps - [disposition: merge] document ABI compatibility
- [disposition: merge] Broaden the consequences of recursive TLS initialization
- [disposition: merge] Implement
BufRead
forVecDeque<u8>
- [disposition: merge] Tracking Issue for
feature(file_set_times)
:FileTimes
andFile::set_times
- [disposition: merge] impl Not, Bit{And,Or}{,Assign} for IP addresses
- [disposition: close] Make
RefMut
Sync
- [disposition: merge] Implement FusedIterator for DecodeUtf16 when the inner iterator does
- [disposition: merge] Stabilize
{IpAddr, Ipv6Addr}::to_canonical
- [disposition: merge] rustdoc: hide
#[repr(transparent)]
if it isn't part of the public ABI
New and Updated RFCs
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-11 - 2023-11-08 🦀
Virtual
- 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 (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 (Indianapolis, IN, US) | Indy Rust
Asia
- 2023-10-11 | Kuala Lumpur, MY | GoLang Malaysia
- 2023-10-18 | Tokyo, JP | Tokyo Rust Meetup
Europe
- 2023-10-11 | Brussels, BE | BeCode Brussels Meetup
- 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-19 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2023-10-19 | Wrocław, PL | Rust Wrocław
- 2023-09-19 | Virtual (Washington, DC, US) | Rust DC
- 2023-10-25 | Dublin, IE | Rust Dublin
- 2023-10-26 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-10-26 | Delft, NL | Rust Nederland
- 2023-11-07 | Brussels, BE | Rust Aarhus
North America
- 2023-10-11 | Boulder, CO, US | Boulder Rust Meetup
- 2023-10-12 | Lehi, UT, US | Utah Rust
- 2023-10-13 | Cambridge, MA, US | Boston Rust Meetup
- 2023-10-17 | San Francisco, CA, US | San Francisco Rust Study Group
- 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-25 | Austin, TX, US | Rust ATX
- 2023-10-25 | Chicago, IL, US | Deep Dish Rust
Oceania
- 2023-10-17 | Christchurch, NZ | Christchurch Rust Meetup Group
- 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
The Rust mission -- let you write software that's fast and correct, productively -- has never been more alive. So next Rustconf, I plan to celebrate:
- All the buffer overflows I didn't create, thanks to Rust
- All the unit tests I didn't have to write, thanks to its type system
- All the null checks I didn't have to write thanks to Option and Result
- All the JS I didn't have to write thanks to WebAssembly
- All the impossible states I didn't have to assert "This can never actually happen"
- All the JSON field keys I didn't have to manually type in thanks to Serde
- All the missing SQL column bugs I caught at compiletime thanks to Diesel
- All the race conditions I never had to worry about thanks to the borrow checker
- All the connections I can accept concurrently thanks to Tokio
- All the formatting comments I didn't have to leave on PRs thanks to Rustfmt
- All the performance footguns I didn't create thanks to Clippy
– Adam Chalmers in their RustConf 2023 recap
Thanks to robin 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