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.
Official
Newsletters
Project/Tooling Updates
- IntelliJ Rust Changelog #190
- rust-analyzer changelog #172
- rustc_codegen_gcc: Progress Report #21
- Fornjot (code-first CAD in Rust) - Weekly Release - Thoroughly Mediocre
- Rust Insight! - an interactive book for practicing Rust
- Mockito, the HTTP mocking library for Rust, goes 1.0
- Klint: Compile-time Detection of Atomic Context Violations for Kernel Rust Code
- Leveraging Rust and the GPU to render user interfaces at 120 FPS
Observations/Thoughts
- To async trait or just to trait
- Writing an LLVM backend for the Move language in Rust
- STM32F4 Embedded Rust at the PAC: UART Communication
- A Guide to Declarative Macros in Rust
- SQLx Compile Time Woes
- I built a startup in Rust, I would do it again.
- rustdoc and the re-exports
- The registers of Rust
- Switching From C++ to Rust
- Emitting Safer Rust with C2Rust
- Applying 5 million pixel updates per second with Rust & wgpu
- Rust in the Real World: Super Fast Data Ingestion Using ScyllaDB
- Rust: How We Built a Privacy Framework for Data Science
- Writing a Kubernetes Operator
- Getting Past “Ampersand-Driven Development” in Rust
- (video) Teaching Embedded Rust
Rust Walkthroughs
- Beginning Rust: by exploring a very basic Axum web API in detail
- Rewriting the CLI in Rust: Was It Worth It?
- Trace through a Kafka Cluster using OpenTelemetry
- Tour of a HTTP request in Rust
Miscellaneous
- Why Turborepo is migrating from Go to Rust
- Leveraging Rust and the GPU to render user interfaces at 120 FPS
- Automotive Safety and Cybersecurity: Infineon's AURIX™ TC3xx, TC4x, TRAVEO™ T2G & PSoC families of microcontrollers support Rust - Infineon Technologies
- [video] Bestagon Mesh Generation: Waveform Collapse in Bevy
- [video] Bye WebSockets! Boost Web Comms with Rust and WebTransport
- [video] Learn Bevy 0.10 - EP4 - Enemy Movement, Collisions, Sound Effects, Despawning
- [video] Rust Releases! Rust 1.68.0
- [video] Interview and AMA with Josh Triplett
- [audio] Q&A with Mara Bos
Crate of the Week
This week's crate is duplicate, a proc macro crate for easy parametric code duplication.
Thanks to Anton Fetisov 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.
- man-in-the-middle-proxy - Make order with constants and hard coded parts
- man-in-the-middle-proxy - pause and play the request
- man-in-the-middle-proxy - Highlight a request in the list when clicked
- man-in-the-middle-proxy - add different colors for different request method
- Ockam - Create clap command to show the details of an existing TCP connection on a node
- Ockam - Create clap command to show the details of an existing Forwarder on a node
- Ockam - improve install.sh to install in path
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
391 pull requests were merged in the last week
- account for binders correctly when adding default RPITIT method assumption
- force parentheses around
match
expression in binary expression - allow negative numeric literals in
concat!
- add suggestion to diagnostic when user has array but trait wants slice
- always resolve to universal regions if possible
- check for free regions in MIR validation
- check that a query has not completed and is not executing before starting it
- custom MIR: Support
as
casts - directly construct Inherited in typeck
- do not ICE when failing to normalize in
ConstProp
- do not ICE when interpreting a cast between non-monomorphic types
- do not ICE when we have fn pointer
Fn
obligations with bound vars in the self type - do not consider
&mut *x
as mutatingx
inCopyProp
- don't even try to combine consts with incompatible types
- emit alias-eq when equating numeric var and projection
- emit the
suspicious_auto_trait_impls
lint for negative impls as well - ensure value is on the on-disk cache before returning from
ensure()
- expand on the allocator comment in
rustc-main
- improve errors in case of ident with number at start
- impl better help for
.poll()
not found onimpl Future
- implement better error for manual impl of
Fn*
traits - avoid unnecessary hashing
- fix invalid inlining of reexport of reexport of private item
- gate usages of
dyn*
and const closures in macros - greatly improve the error messages when
run-make/translation
fails - honor current target when checking conditional compilation values
- implement goal caching with the new solver
- make RPITITs simple cases work when using
lower_impl_trait_in_trait_to_assoc_ty
- make
unused_allocation
lint againstBox::new
too - place binder correctly for arbitrary trait bound suggestion
- relax ordering rules for
asm!
operands - strengthen state tracking in const-prop
- tweak illegal
Copy
impl message - unconstrained terms should account for infer vars being equated
- fix projection substitution order considering GATs
- remove
box_syntax
- stabilize
nonzero_min_max
- stabilize
path_as_mut_os_str
- stabilize movbe target feature
- add
round_ties_even
tof32
andf64
- make
ptr::from_ref
andptr::from_mut
const - move
Option::as_slice
to an always-sound implementation - prevent overflow through
Arc::downgrade
- introduce
Rc::into_inner
, as a parallel toArc::into_inner
- futures: Add
AbortRegistration::handle
- futures: Make BiLock strict-provenance compatible
- futures:
TryFlattenUnordered
: propagate base stream error - cargo: Adding display of which target failed to compile
- cargo:
cargo install --git
multiple packages with binaries found hint - rustdoc: don't crash on
crate
references in blocks - rustdoc: don't hide anonymous reexport
- rustdoc: include link on all.html location header
- rustdoc: reduce allocs in
FnDecl::inner_full_print
- rustdoc: sort deprecated items lower in search
- rustdoc: use restricted Damerau-Levenshtein distance for search
- clippy: add
collection_is_never_read
- clippy: add
let_with_type_underscore
lint - clippy: add
missing_assert_message
lint - clippy: add new
redundant_async_block
lint - clippy: add the
popular-crates
binary - clippy: don't lint
manual_clamp
in const contexts - clippy: fix semicolon insertion in
match_single_binding
- clippy: improve diagnostic of
no_mangle_with_rust_abi
- clippy: include async functions in the
len_without_is_empty
- clippy:
arithmetic_side_effects
fix false positive on shifts - rust-analyzer: add core lib to
proc_macro
dependencies - rust-analyzer: fix stack overflow when derefrencing
&!
- rust-analyzer: allow adding extra
cargo
args when running build scripts - rust-analyzer: fix multiple definition binding in match to let-else
- rust-analyzer: don't trigger unresolved method/field diagnostics on types containing errors
- rust-analyzer: evaluate consts in
path_to_const
- rust-analyzer: fix block defmap not looking into tail expressions for macro calls
- rust-analyzer: fix search not searching bodies of attributed items
- rust-analyzer: highlight unresolved derives as being unresolved
- rust-analyzer: load proc-macros for
rustc_private
crates - rust-analyzer: watch both stdout and stderr in flycheck
Rust Compiler Performance Triage
A fairly mixed week, with several significant improvements and a few significant regressions. On average, this week saw a slight increase in compile times.
Triage done by @simulacrum. Revision range: 8f9e09ac..0058748
4 Regressions, 6 Improvements, 4 Mixed; 2 of them in rollups 39 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] Tracking Issue for
{Arc, Rc}::into_inner
- [disposition: merge] rustdoc: add support for type filters in arguments and generics
- [disposition: merge] Lint ambiguous glob re-exports
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-03-15 - 2023-04-12 🦀
Virtual
- 2023-03-15 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-03-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-03-16 | Virtual (Raleigh, NC, US) | Triangle BitDevs
- 2023-03-16 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-16 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-03-21 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-21 | Virtual (Washington, DC, US) | Rust DC
- 2023-03-22 | Virtual (Richmond, VA, US) | Rustaceans RVA
- 2023-03-27 | Virtual | Rust Formal Methods Interest Group
- 2023-03-28 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-03-28 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-29 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-04-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-04-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-04-05 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-04-11 | Virtual | Rust Live
Europe
- 2023-03-09 | Basel, CH | Rust Basel
- 2023-03-09 | Delft, NL | Rust Nederland
- 2023-03-09 | Lyon, FR | Rust Lyon
- 2023-03-15 | Nürnberg, DE | Rust Nuremberg
- 2023-03-15 | Trondheim, NO | Rust Trondheim
- 2023-03-16 | Paris, FR | OCaml Users in Paris - OUPS
- 2023-03-17 | Stuttgart, DE | Rust Community Stuttgart
- 2023-03-28 | Zurich, CH | Rust Zurich
- 2023-03-29 | Paris, FR | Rust Paris
- 2023-04-04 | Berlin, DE | Berline.rs
North America
- 2023-03-21 | San Francisco, CA, US | San Francisco Rust Study Group
Asia
- 2023-04-08 | Kyoto, JP | Kansai Rust
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 compiler is a thousand unit tests that you don't have to write
– Someone, likely Ian Purton on the Cloak blog
Thanks to Stephan Sokolow 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