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
Project/Tooling Updates
Observations/Thoughts
- Trying to invent a better substring search algorithm
- Improving Node.js with Rust-Wasm Library
- Mixing C# and Rust - Interop
- A fresh look on incremental zero copy serialization
- Make the Rust compiler 5% faster with this one weird trick
- Part 3: Rowing Afloat Datatype Boats
- Recreating concurrent futures combinators in smol
- Unpacking some Rust ergonomics: getting a single Result from an iterator of them
- Idea: "Using Rust", a living document
- Object Soup is Made of Indexes
- Issue #10: Serving HTML
- Rust vs C on an ATTiny85; an embedded war story
Rust Walkthroughs
- Analyzing Data 180,000x Faster with Rust
- Fully Automated Releases for Rust Projects
- Make your Rust code unit testable with dependency inversion
- Nine Rules to Formally Validate Rust Algorithms with Dafny (Part 2): Lessons from Verifying the range-set-blaze Crate
- [video] Let's write a message broker using QUIC - Broke But Quick Episode 1
- [video] Publishing Messages over QUIC Streams!! - Broke But Quick episode 2
Miscellaneous
- [video] Associated types in Iterator bounds
- [video] Rust and the Age of High-Integrity Languages
- [video] Implementing (part of) a BitTorrent client in Rust
Crate of the Week
This week's crate is cargo-show-asm, a cargo subcommand to show the optimized assembly of any function.
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 (Hacktoberfest)- [FEATURE] separate payments_session from payments core
- Hyperswitch (Hacktoberfest)- [NMI] Use connector_response_reference_id as reference to merchant
- Hyperswitch (Hacktoberfest)- [Airwallex] Use connector_response_reference_id as reference to merchant
- Hyperswitch (Hacktoberfest)- [Worldline] Use connector_response_reference_id as reference to merchant
- Ockam - Make
ockam project delete
(no args) interactive by asking the user to choose from a list of space and project names to delete (tuify) - Ockam - Validate CBOR structs according to the cddl schema for
authenticator/direct/types
- Ockam - Slim down the
NodeManagerWorker
fornode / node status
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
397 pull requests were merged in the last week
- rewrite gdb pretty-printer registration
- add FileCheck annotations to mir-opt tests
- add MonoItems and Instance to
stable_mir
- add a
csky-unknown-linux-gnuabiv2hf
target - add a test showing failing closure signature inference in new solver
- add new simpler and more explicit syntax for check-cfg
- add stable
Instance::body()
and RustcInternal trait - automatically enable cross-crate inlining for small functions
- avoid a
track_errors
by bubbling up most errors fromcheck_well_formed
- avoid having
rustc_smir
depend onrustc_interface
orrustc_driver
- coverage: emit mappings for unused functions without generating stubs
- coverage: emit the filenames section before encoding per-function mappings
- coverage: fix inconsistent handling of function signature spans
- coverage: move most per-function coverage info into
mir::Body
- coverage: simplify the injection of coverage statements
- disable
missing_copy_implementations
lint onnon_exhaustive
types - do not bold main message in
--error-format=short
- don't ICE when encountering unresolved regions in
fully_resolve
- don't compare host param by name
- don't crash on empty match in the
nonexhaustive_omitted_patterns
lint - duplicate
~const
bounds with a non-const one in effects desugaring - eliminate
rustc_attrs::builtin::handle_errors
in favor of emitting errors directly - fix a performance regression in obligation deduplication
- fix implied outlives check for GAT in RPITIT
- fix spans for removing
.await
onfor
expressions - fix suggestion for renamed coroutines feature
- implement an internal lint encouraging use of
Span::eq_ctxt
- implement jump threading MIR opt
- implement rustc part of RFC 3127 trim-paths
- improve display of parallel jobs in rustdoc-gui tester script
- initiate the inner usage of
cfg_match
(Compiler) - lint
non_exhaustive_omitted_patterns
by columns - location-insensitive polonius: consider a loan escaping if an SCC has member constraints applied only
- make
#[repr(Rust)]
incompatible with other (non-modifier) representation hints likeC
andsimd
- make
rustc_onunimplemented
export path agnostic - mention
into_iter
on borrow errors suggestions when appropriate - mention the syntax for
use
onmod foo;
iffoo
doesn't exist - panic when the global allocator tries to register a TLS destructor
- point at assoc fn definition on type param divergence
- preserve unicode escapes in format string literals when pretty-printing AST
- properly account for self ty in method disambiguation suggestion
- report
unused_import
for empty reexports even it is pub - special case iterator chain checks for suggestion
- strict provenance unwind
- suggest
;
after barematch
expression E0308 - suggest constraining assoc types in more cases
- suggest relaxing implicit
type Assoc: Sized;
bound - suggest removing redundant arguments in
format!()
- uplift movability and mutability, the simple way
- miri: avoid a linear scan over the entire
int_to_ptr_map
on each deallocation - miri: fix rounding mode check in SSE4.1 round functions
- miri: intptrcast: remove information about dead allocations
- disable effects in libcore again
- add
#[track_caller]
toOption::unwrap_or_else
- specialize
Bytes<R>::next
whenR
is aBufReader
- make TCP connect handle EINTR correctly
- on Windows make
read_dir
error on the empty path - hashbrown: add low-level
HashTable
API - codegen_gcc: add support for NonNull function attribute
- codegen_gcc: fix
#[inline(always)]
attribute and support unsigned comparison for signed integers - codegen_gcc: fix endianness
- codegen_gcc: fix int types alignment
- codegen_gcc: optimize popcount implementation
- codegen_gcc: optimize u128/i128 popcounts further
- cargo add: Preserve more comments
- cargo remove: Preserve feature comments
- cargo replace: Partial-version spec support
- cargo: Provide next steps for bad -Z flag
- cargo: Suggest cargo-search on bad commands
- cargo: adjust
-Zcheck-cfg
for new rustc syntax and behavior - cargo: if there's a version in the lock file only use that exact version
- cargo: make the precise field of a source an Enum
- cargo: print environment variables for build script executions with
-vv
- cargo: warn about crate name's format when creating new crate
- rustdoc: align stability badge to baseline instead of bottom
- rustdoc: avoid allocating strings primitive link printing
- clippy:
map_identity
: allow closure with type annotations - clippy:
map_identity
: recognize tuple identity function - clippy: add lint for
struct
field names - clippy: don't emit
needless_pass_by_ref_mut
if the variable is used in an unsafe block or function - clippy: make
multiple_unsafe_ops_per_block
ignore await desugaring - clippy: needless pass by ref mut closure non async fn
- clippy: now
declare_interior_mutable_const
andborrow_interior_mutable_const
respect theignore-interior-mutability
configuration entry - clippy: skip
if_not_else
lint for '!= 0'-style checks - clippy: suggest passing function instead of calling it in closure for
option_if_let_else
- clippy: warn
missing_enforced_import_renames
by default - rust-analyzer: generate descriptors for all unstable features
- rust-analyzer: add command for only opening external docs and attempt to fix vscode-remote issue
- rust-analyzer: add incorrect case diagnostics for module names
- rust-analyzer: fix VS Code detection for Insiders version
- rust-analyzer: import trait if needed for
unqualify_method_call
assist - rust-analyzer: pick a better name for variables introduced by
replace_is_some_with_if_let_some
- rust-analyzer: store binding mode for each instance of a binding independently
- perf: add NES emulation runtime benchmark
Rust Compiler Performance Triage
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] Consider alias bounds when computing liveness in NLL (but this time sound hopefully)
- [disposition: close] regression: parameter type may not live long enough
- [disposition: merge] Remove support for compiler plugins.
- [disposition: merge] rustdoc: Document lack of object safety on affected traits
- [disposition: merge] Stabilize Ratified RISC-V Target Features
- [disposition: merge] Tracking Issue for const mem::discriminant
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-25 - 2023-11-22 🦀
Virtual
- 2023-10-30 | Virtual (Melbourne, VIC, AU) | Rust Melbourne
- 2023-10-31 | Virtual (Europe / Africa) | Rust for Lunch
- 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-07 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-11-07 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-11-09 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-11-14 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-11-15 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-11-15 | Virtual (Richmond, VA, US) | Linux Plumbers Conference
- 2023-11-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-11-16 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-11-07 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-11-21 | Virtual (Washington, DC, US) | Rust DC
Europe
- 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 | Copenhagen, DK | Copenhagen Rust Community
- 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 | Bratislava, SK | Bratislava Rust Meetup Group
- 2023-11-07 | Brussels, BE | Rust Aarhus
- 2023-11-07 | Lyon, FR | Rust Lyon
- 2023-11-09 | Barcelona, ES | BcnRust
- 2023-11-09 | Reading, UK | Reading Rust Workshop
- 2023-11-21 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-11-23 | Biel/Bienne, CH | Rust Bern
North America
- 2023-10-25 | Austin, TX, US | Rust ATX
- 2023-10-25 | Chicago, IL, US | Deep Dish Rust
- 2023-11-01 | Brookline, MA, US | Boston Rust Meetup
- 2023-11-08 | Boulder, CO, US | Boulder Rust Meetup
- 2023-11-14 | New York, NY, US | Rust NYC
- 2023-11-14 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
- 2023-11-15 | Richmond, VA, US + Virtual | Linux Plumbers Conference
- 2023-11-16 | Nashville, TN, US | Music City Rust Developers
- 2023-11-16 | Seattle, WA, US | Seattle Rust User Group
- 2023-11-21 | San Francisco, CA, US | San Francisco Rust Study Group
- 2023-11-22 | Austin, TX, US | Rust ATX
Oceania
- 2023-10-26 | Brisbane, QLD, AU | Rust Brisbane
- 2023-10-30 | Melbourne, VIC, AU + Virtual | Rust Melbourne
- 2023-11-21 | Christchurch, NZ | Christchurch Rust Meetup Group
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 :ferris:
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