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? Tweet us at @ThisWeekInRust 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
Official
Project/Tooling Updates
- rust-analyzer changelog #136
- GCC-Rust Feedback Sought - Possibly Aiming For Upstream In GCC 13
- Announcing lettre 0.10 - lettre
- The last two years in Miri
- Fornjot (code-first CAD in Rust) - Weekly Dev Log - 2022-W26
- HexoSynth (modular synthesizer) - Devlog 3 - Chunk of GUI Work
- Slint UI crate weekly updates
- This week in Databend #49: A Modern Cloud Data Warehouse for Everyone
Observations/Thoughts
- C++ & Rust: (Interior) Mutability, Moving and Ownership
- More than you've ever wanted to know about errors in Rust
- Minimalist Guide to Axum
- Insights of porting Hugging Face Rust Tokenizers to WASM
- [audio] New Rustacean with Chris Krycho
- [video] The Future of Programming Languages
Rust Walkthroughs
- mirrord internals - hooking libc functions in Rust and fixing bugs
- Pathfinding in Rust: A tutorial with examples
- Plantuml encoding in Rust using TDD
- A const builder pattern in Rust
- STM32F4 Embedded Rust at the HAL: Button Controlled Blinking by Timer Polling
- [video] Simple error handling in Rust
- [video] Making a Rust crate compile faster
- [video] Rust for the impatient
- [video] Cph.rs Hack Night - Simon Rasmussen on WASM and WAT the fp-bindgen
- [video] Cph.rs Hack Night - David Pedersen on Axum
Miscellaneous
- [DE] Rust-Code im Linux-Kernel: Merge steht laut Linus Torvalds ab Linux 5.20 bevor
- [DE] Ferris Talk #10: Constant Fun mit Rust – const fn
- [DE] Programmiersprache Rust 1.62 kann Kernel für x86-64 bauen
- [video] Rust Coming Soon To A Linux Kernel Near You!!
Crate of the Week
This week's crate is coprosize, a (you guessed it) program aiding the study of dinosaur dung.
Thanks to piotr for the self-nomination.
Please submit your suggestions and votes for next week!
Call for Participation
Always wanted to contribute to open-source projects but didn't 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
415 pull requests were merged in the last week
- proc_macro/bridge: stop using a remote object handle for proc_macro
Punct
andGroup
- diagnostics: structs with new slug syntax
- clean up arg mismatch diagnostic, generalize tuple wrap suggestion
- improve some inference diagnostics
- some borrowck diagnostic fixes
- make TAIT behave exactly like RPIT
- fix FFI-unwind unsoundness with mixed panic mode
- fix ICE for associated constant generics
- fix glob import ICE in rustdoc JSON format
- fix rust-call ICE in mir-inliner
- fix box with custom allocator in miri
- miri: allow non-ZST allocations to be adjacent
- miri: enable permissive provenance by default
- miri: optimizing Stacked Borrows (part 1?): cache locations of tags in a Borrow Stack
- miri: add
./miri clippy
- miri: allocation tracking: also print size, alignment, kind of the allocation
- miri: stacked borrows: add option for recursive field retagging
- miri: tweak
int2ptr
diagnostics - avoid some
&str
toString
conversions withMultiSpan::push_span_label
- avoid unnecessary work in
finalize_resolutions_in
- don't use match-destructuring for derived ops on structs
- enable MIR inlining
- improve some deriving code and add a test
- optimize non-consuming operators
impl<T: AsRawFd> AsRawFd for
{Arc
,Box
}<T>
- add
fetch_not
method onAtomicBool
- optimize
Vec::insert
for the case whereindex == len
- optimise vectored write
- fix data race in
thread::scope
- cargo: don't panic with
--offline
- rustfmt: allow
#[ignore]
tests to run in rustfmt's test suite - rustfmt: config_type: add
unstable_variant
attribute - clippy: add
Operators
lint pass - clippy: add
invalid_utf8_in_unchecked
- clippy: add lint
explicit_auto_deref
take 2 - clippy: don't lint
while_let_loop
when significant drop order would change - clippy: fix ICE in
dereference.rs
- clippy: fix
#[expect]
for most clippy lints - clippy: fix direct
#[allow]
attributes inlet_unit_value
- clippy: fix false-positive in
equatable_if_let
- clippy:
new_without_default
: ignore const generics/lifetime params onfn new
- clippy:
trivially_copy_pass_by_ref
fixes - let rust-analyzer ship on stable, non-preview
- rust-analyzer: complete raw identifier with "r#" prefix
- rust-analyzer: show witnesses of non-exhaustiveness in
missing-match-arm
diagnostic - rust-analyzer: implement destructuring assignment
- rust-analyzer: fix regressions on assignment expressions
- rust-analyzer: fix attribute macros on assoc items being discarded with disabled proc macros
- rust-analyzer: fix: extract Function produces duplicate fn names
- rust-analyzer: fix: complete enum variants as patterns in pattern path
- rust-analyzer: report proc macro errors in expressions correctly as well
Rust Compiler Performance Triage
Overall the week is a small improvement on average, with some benchmarks (particularly in the primary category) showing significant improvements due to the enablement of MIR inlining in #91743. Inlining promises to improve the quality of our generated LLVM IR and make other optimizations more worthwhile, so it's great to see these early results already being quite impactful.
Triage done by @simulacrum. Revision range: baf382e6..880646c
3 Regressions, 6 Improvements, 6 Mixed; 4 of them in rollups 46 artifact comparisons made in total
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.
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] Make outlives::{components,verify} agree
- [disposition: merge] Enforce that layout size fits in isize in Layout
- [disposition: merge] Tracking Issue for feature(core_c_str) and feature(alloc_c_string)
- [disposition: merge] Remove restrictions on compare-exchange memory ordering.
- [disposition: merge] Partially stabilize const_slice_from_raw_parts
- [disposition: merge] Implement network primitives with ideal Rust layout, not C system layout
- [disposition: merge] Tracking Issue for
feature future_poll_fn
- [disposition: merge] Stabilize const-weak-new
- [disposition: merge] stabilise mixed_integer_ops
- [disposition: merge] Implement
fmt::Write
forOsString
- [disposition: merge] Tracking Issue for process_set_process_group
New and Updated RFCs
Upcoming Events
Rusty Events between 2022-07-06 - 2022-08-03 🦀
Virtual
- 2022-07-06 | Indianapolis, IN, US | Indy Rust
- 2022-07-07 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-07-09 | Virtual | Rust Game Dev
- 2022-07-11 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2022-07-12 | Dallas, TX, US | Dallas Rust
- 2022-07-12 | Munich, DE | Rust Munich
- 2022-07-13 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-07-13 | Malaysia, MY | Rust Malaysia Meetup
- 2022-07-14 | Nürnberg, DE | Rust Nurnberg DE
- 2022-07-16 | Vancouver, BC, CA | Vancouver Rust
- 2022-07-19 | Sydney, NSW, AU | Rust Australia
- 2022-07-19 | Washington, DC, US | Rust DC
- 2022-07-21 | Stuttgart, DE | Rust Community Stuttgart
- 2022-07-26 | Dallas, TX, US | Dallas Rust
- 2022-07-29 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2022-07-31 | Seattle, WA, US | Seattle Rust Meetup
- 2022-08-02 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-08-03 | Indianapolis, IN, US | Indy Rust
- 2022-08-03 | Stuttgart, DE | Rust Community Stuttgart
Europe
- 2022-07-06 | Paris, FR | Stockly
- 2022-07-12 | Munich, DE | Rust Munich
North America
- 2022-07-11 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2022-07-13 | Atlanta, GA, US | Rust Atlanta
- 2022-07-14 | Columbus, IL | Columbus Rust Society
- 2022-07-19 | San Francisco, CA, US | San Francisco Rust Study Group
- 2022-07-26 | Austin, TX, US | ATX Rustaceans
Oceania
- 2022-07-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
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
TIL: #cargo has build-in aliases for some commands
so next time try out
cargo r
cargo b
cargo t
llogiq is pretty pleased with his choice.
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.
Email list hosting is sponsored by The Rust Foundation