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
Foundation
Newsletters
Project/Tooling Updates
- This Month in hyper: November 2022
- IntelliJ Rust Changelog #184
- rust-analyzer changelog #158
- This Week in Fyrox
- GCC Rust Front-End v4 Posted - Now Cleared For Merging In GCC 13
- What's new in Seaography 0.3.0
- Fornjot (code-first CAD in Rust) - Weekly Release
- Helix editor 22.12 released
Observations/Thoughts
- Embedded Rust & Embassy: PWM Generation
- Self-referential types for fun and profit
- Parsing numbers into base-10 decimals with SIMD
- How much does Rust's bounds checking actually cost?
- What Every Rust Developer Should Know About Macro Support in IDEs
- [video] High Performance Rust UI
Rust Walkthroughs
- Introduction to Rust: Writing an HTTP CLI client
- Hacking Bluetooth to Brew Coffee from GitHub Actions: Part 1 - Bluetooth Investigation
Miscellaneous
- Rust Axum/Vue WebSocket Demo
- Advent of Code 2022
- Memory Safe Languages in Android 13
- The book "Rust Web Development" (Manning) is released
Crate of the Week
This week's crate is zeroize, a crate to securely clear secrets from memory either manually or on drop, with both methods for your types being but one #[derive]
away.
Thanks to Tally for the suggestion!
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
339 pull requests were merged in the last week
- remove drop order twist of && and || and make them associative
rustc_ast_lowering:
stop lowering imports into multiple items- avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code
- don't add a note for implementing a trait if its inner type is erroneous
- don't elide type information when printing E0308 with
-Zverbose
- don't suggest associated function call for associated const
- restore
use
suggestion fordyn
method call requiringSized
- some initial normalization method changes
- suggest to use . instead of
::
when accessing a method of an object - implement
should_continue
in chalk-recursive - miri: refactor scheduler
- rewrite LLVM's archive writer in Rust
- cheaper
dump_mir
- allow to feed a value in another query's cache
- attribute cleanups
- also cache the stable hash of interned Predicates
- merge generics and where predicates and prevent duplicates in where predicates
- adjust inlining attributes around
panic_immediate_abort
- ensure query backtraces work for
DefId
s created after ast lowering - add
type_ascribe!
macro as placeholder syntax for type ascription - stabilize
nonzero_bits
- make
VecDeque::new_in
unstably const - send
VecDeque::from_iter
viaVec::from_iter
- add
PathBuf::as_mut_os_string
andPath::as_mut_os_str
- implement TcpStream shutdown for wasm32-wasi
- create a hacky fail-fast mode that stops tests at the first failure
- cargo: aware of compression ratio for unpack size limit
- cargo: improve file found in multiple build targets warning
- rustdoc-Json: don't inline foreign traits
- clippy:
comparison_to_empty
: peel derefs in suggestions - clippy:
manual_let_else:
keep macro call on suggestion blocks - clippy: don't cross contexts while building the suggestion for
redundant_closure_call
- clippy: don't lint
explicit_auto_deref
when the initial type is neither a reference, nor a receiver - clippy: don't lint
from_over_into
for opaque types - clippy: don't lint
implicit_clone
when the type doesn't implement clone - clippy: don't lint
manual_assert
inelse if
- clippy: don't lint
string_lit_as_bytes
in match scrutinees - clippy: don't lint
unnecessary_cast
in mixed macro context - clippy: don't lint
unnecessary_operation
in mixed macro contexts - clippy: don't suggest removing
mut
from references inredundant_static_lifetimes
- clippy: fix ICE in
unnecessary_to_owned
- clippy: fix ICE in
result_large_err
with uninhabited enums - clippy: fix ICE in
unused_rounding
- clippy: fix
manual_let_else
producing a wrong suggestion with or-patterns - clippy: fix
unnecessary_cast
suggestion when taking a reference - clippy: move
index_refutable_slice
topedantic
- clippy: move
unnecessary_unsafety_doc
topedantic
- rust-analyzer: add
move_const_to_impl
assist - rust-analyzer: implement vararg parameter type inference
- rust-analyzer: fix signature help not showing up when cursor is between
))
or>>
Rust Compiler Performance Triage
A mixed bag of a week. 2 of the 3 regressions are connected to changes to the query system that underlies incremental compilation. The third regression is still being investigated. For all three, the impact on cycle counts that are within our noise tolerance levels There were several small-ish improvements, though PR #104963 is worth calling out: a well-factored change to how we lower the AST into HIR that had a broad positive impact. One final note: the summary-opt max-rss seems to gone up by 1.5% over the past month (perf), via a gradual climb; just something to keep our eyes on going forward.
Triage done by @pnkfelix. Revision range: 8a09420a..9db224fc
See the full report for details.
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:
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] Implement DerefMut for PathBuf
- [disposition: merge] Find the right lower bound region in the scenario of partial order relations
New and Updated RFCs
Upcoming Events
Rusty Events between 2022-12-07 - 2023-01-04 🦀
Virtual
- 2022-12-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-12-07 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-12-08 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-12-08 | Virtual (San Francisco, CA, US) | Data + AI Online Meetup
- 2022-12-10 | Virtual | Rust GameDev
- 2022-12-13 | Virtual (Dallas, TX, US) | Dallas Rust
- 2022-12-13 | Virtual (Rostock, DE) | Altow Academy
- 2022-12-13 | Virtual (Saarbrücken, DE) | Rust-Saar
- 2022-12-14 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2022-12-24 | Virtual (Linz, AT) | Rust Linz
- 2022-12-14 | Virtual (México City, MX) | Rust MX
- 2022-12-15 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-12-20 | Virtual (Berlin, DE) | Berlin.rs
- 2022-12-20 | Virtual (Washington, DC, US) | Rust DC
- 2022-12-21 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2022-12-27 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-01-03 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-01-04 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-01-04 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
Asia
- 2022-12-29 | Tel Aviv, IL | Rust TLV
Europe
- 2022-12-07 | Cologne, DE | Rust Cologne
- 2022-12-07 | Zurich, CH | Rust Zurich
- 2022-12-14 | Trondheim, NO | Rust Trondheim
- 2022-12-15 | Stuttgart, DE | Rust Community Stuttgart
North America
- 2022-12-08 | Columbus, OH, US | Columbus Rust Society
- 2022-12-14 | Austin, TX, US | Rust ATX
- 2022-12-20 | San Francisco, CA, US | San Francisco Rust Study Group
- 2022-12-27 | Austin, TX, US | ATX Rustaceans
Oceania
- 2022-12-09 | Melbourne, VIC, AU | Rust Melbourne
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
To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code.
– Jeffrey Vander Stoep on the google security team blog
Thanks to Anton Fetisov 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