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. If you find any errors in this week's issue, please submit a PR.
Updates from Rust Community
Newsletters
Project/Tooling Updates
- New in IntelliJ Rust for 2023.1 (Part 2)
- rust-analyzer changelog #181
- Trippy (Network diagnostic tool) - 0.8.0 release
- Taking Rust to the Cloud: Blazingly Fast File Sharing
- no more bit fiddling - introducing bilge
Observations/Thoughts
- You are holding it wrong
- Task scheduled time in tokio-console
- Single Abstract Method Traits
- A locking war story
- Now is the time to bet big on Rust
- Giving, lending, and async closures
- [video] RustNL 2023 Conference
- [video] Qdrant vector search in Rust | Arnaud Gourlay @ Rust Meetup Linz
- [audio] Glidesort with Orson Peters
- [audio] smol with John Nunley
Rust Walkthroughs
- Build a simple grep CLI app in Rust
- [video] Topological Sort: The Hidden Gem of Graph Algorithms in Rust
Crate of the Week
This week's crate is Qdrant, an open source production ready vector database/similarity search engine written in Rust. There are APIs available for Rust, Python, Javascript/Typescript and Go.
llogiq is overjoyed with his 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 - Add new CLI command to show available environment variables
- Ockam - Update CLI documentation for
project
commands - Ockam - Allow binary messages in
ockam message send
CLI command - RustQuant - call for participants in project
- Hyperswitch - Implement
CardsInfoInterface
forMockDb
- Hyperswitch - Implement
DisputeInterface
forMockDb
- Hyperswitch - Implement
EphemeralKeyInterface
forMockDb
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
326 pull requests were merged in the last week
- add support for
cfg(overflow_checks)
- CFI: fix SIGILL reached via trait objects
- add midpoint function for all integers and floating numbers
- align unsized locals
- allow mutating function args through
&raw const
- better diagnostics for
env!
where variable contains escape - better diagnostics for
impl<..> impl Trait for Type
- encode
VariantIdx
so we can decode ADT variants in the right order - encode types in SMIR
- fix the
FileEncoder
buffer size - implement SSA-based reference propagation
- implement builtin # syntax and use it for
offset_of!(...)
- improve suggestion for
self: Box<self>
- introduce
DynSend
andDynSync
auto trait for parallel compiler - keep encoding attributes for closures
- min specialization improvements
- note user-facing types of coercion failure
- only warn single-use lifetime when the binders match
- require impl Trait in associated types to appear in method signatures
- suggest let for possible binding with ty
- support linking to rust dylib with --crate-type staticlib
- switch to
EarlyBinder
forthir_abstract_const
query - tweak "make mut" spans when assigning to locals
- tweak borrow suggestion span
- uplift
clippy::{drop,forget}_{ref,copy}
lints - use
visit_assign
to detect SSA locals - use by ref TokenTree iterator to avoid a few clones
- use dynamic dispatch for queries
- use implied bounds when checking opaque types
- use proper impl self type for alias impl in rustdoc
- allow MIR debuginfo to point to a variable's address
- custom MIR: Support
Rvalue::CopyForDeref
- miri: add
./miri run-dep
for running a file with test dependencies available - miri: cargo-miri: fix forwarding arguments to cargo
- miri: implement SIMD ptr casts
- miri: support array return types in
simd_bitmask
- reduce BitSet size used in
Borrows
dataflow analysis - simplify
find_width_of_character_at_span
- simplify the implementation of iterators over slices of ZSTs
- stabilize
const_ptr_read
- stabilize const
slice::split_at
- always const-evaluate the GCD in
slice::align_to_offsets
- limit lifetime of
format_args!()
with inlined args - implement
AsHandle
/AsSocket
forArc
/Rc
/Box
on Windows - shorten lifetime of panic temporaries in
panic_fmt
case - start using
windows sys
for Windows FFI bindings in std - cargo: fix
check_for_file_and_add
's check for conflict file - cargo: fix dep/feat syntax with hidden implicit optional dependencies
- cargo: remove useless drop of copy type
- cargo: semver: note that it is not a breaking change to make an unsafe function safe
- clippy:
[arithmetic_side_effects]
Consider referenced allowed or hard-coded types - clippy:
needless_bool
: do not simplify code if it loses comments - clippy: add configuration options to
--explain
- clippy: add lint
manual_next_back
- clippy: don't emit
clippy::useless_conversion
on type aliases - clippy: extend
trait_duplication_in_bounds
to cover trait objects - clippy: warn on empty line outer
AttrKind::DocComment
- rust-analyzer: add basic support for
augmentsSyntaxTokens
and non-standard semantic token config - rust-analyzer: add metrics for unevaluated constants, failed mir bodies, and failed data layouts
- rust-analyzer: expand more single ident macro calls upon item collection
- rust-analyzer: add
#[doc(alias(..))]-based
method completions - rust-analyzer: add macro modifier for highlighting tokens in macro calls
- rust-analyzer: fix perf regression from symbol index refactor
- rust-analyzer: fix process-changes duplicating change events
- rust-analyzer: introduce macro sub-namespaces and
macro_use
prelude - rust-analyzer: more APIs for
la_arena::IdxRange
- rust-analyzer: remove root component from patched Windows UNC path prefix
- rust-analyzer: restructure InlayHint, no longer derive properties from its kind
- rust-analyzer: support
#[macro_use(name, ...)]
Rust Compiler Performance Triage
The last two weeks mostly have small changes across a number of benchmarks, no widespread large regressions or improvements.
Triage done by @simulacrum. Revision range: a368898d..3ea9ad532
6 Regressions, 3 Improvements, 4 Mixed; 2 of them in rollups 90 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
Tracking Issues & PRs
- [disposition: merge] Allow limited access to
OsStr
bytes - [disposition: merge] Tracking Issue for
#![feature(offset_of)]
- [disposition: close] Tracking Issue for the x86
ud2
intrinsic - [disposition: merge] Document memory orderings of
thread::{park, unpark}
- [disposition: merge] Tracking Issue for
BuildHasher::hash_one
- [disposition: merge] Tracking Issue for #![feature(unix_chown)]
New and Updated RFCs
- No New or Updated RFCs were created this week.
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-05-17 - 2023-06-14 🦀
Virtual
- 2023-05-17 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-05-17 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-05-18 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-05-20 | Virtual + In person (Singapore, SG) | Web3Dev.Community
- 2023-05-23 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-05-25 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2023-05-25 | Virtual (Ciudad de México, MX) | Rust MX
- 2023-05-25 | Virtual (Karlsruhe, DE) | The Karlsruhe Functional Programmers Meetup Group
- 2023-05-25 | Virtual (San Francisco, CA, US) | Data + AI Online Meetup
- 2023-05-30 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-05-31 | Virtual (Chicago, IL, US) | Chicago Healthcare Cloud Technology Community
- 2023-06-06 | Virtual (Austin, TX, US) | WebAssembly and WasmEdge
- 2023-06-06 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-06-06 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-06-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-06-08 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2023-06-13 | Virtual (Dallas, TX, US) | Dallas Rust
Asia
- 2023-05-18 | Seoul, KR | Seoul Substrate Blockchain Meetup
- 2023-05-20 | Singapore, SG | Web3Dev.Community
- 2023-05-25 | Amsterdam, NL | Frontend Developer Meetup Amsterdam
- 2023-06-10 | Kuala Lumpur, MY | GoLang Malaysia
Europe
- 2023-05-19 | Stuttgart, DE | Rust Community Stuttgart
- 2023-05-23 | Paris, FR | Kaïbee
- 2023-05-24 | Lyon, FR | Rust Lyon
- 2023-05-25 | Barcelona, ES | C++ Programmer Meetup.
- 2023-05-25 | Copenhagen, DK | Copenhagen Rust Community
- 2023-05-25 | Paris, FR | Rust Paris
- 2023-05-30 | Barcelona, ES | BcnRust
- 2023-06-03 | Plovidv, BG | AeroRust
- 2023-06-04 | Plovidv, BG | AeroRust
- 2023-06-08 | Zurich, CH | Rust Zurich
North America
- 2023-05-17 | New York, NY, US | Rust NYC
Oceania
- 2023-05-30 | Canberra, ACT, AU | Canberra Rust User 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
That's one of the great things about Rust: sometimes you can do something really dumb and get away with it.
Thanks to Josh Triplett 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