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
Project/Tooling Updates
- MySQL connection pooling in Rust for Toolforge
- The Sequoia GnuPG Chameleon 0.1 is Released
- Dotenv-linter v3.3.0: Overview
- rust-analyzer changelog #161
- rust-gpu v0.4
- This Week in Fyrox #8
Observations/Thoughts
- cargo-semver-checks today and in 2023
- Rust vs Common C++ Bugs
- 2022 in review (Yoshua Wuyts)
- Rust 2023 (Yoshua Wuyts)
- Rust in 2023 (Gijs Burghoorn)
- Rust in 2023 (azdavis)
- Capture The IP — Or a tiny story about how to over-engineer a simple project for the sake of learning Rust and other things about web services and binaries
- [video] Rust in 2024 (Niko Matsakis)
- [video] Profiling Code in Rust
- [video] Nine Rules for Creating Procedural Macros in Rust
Rust Walkthroughs
- How we extended the River stats module with Rust using PyO3
- A taste of pavex, an upcoming Rust web framework
- Rust visitor pattern and efficient DataFusion query federation
- Embedded Rust and Embassy: Timer Ultrasonic Distance Measurement
- [video] Rust - IAT Hooking
Research
Miscellaneous
Crate of the Week
This week's crate is scraper, a crate for HTML parsing and querying with CSS selectors.
Thanks to Carlo Federico Vescovo for the self-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!
No calls for participation this week. Keep an eye out for more places to contribute next week!
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
344 pull requests were merged in the last week
- make LLD build forward-compatible with LLVM 16
- add
-Zno-jump-tables
- allow
&..
to be parsed as let initializer - add
implied_bounds_entailment
lint - allow building std with cranelift
- correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15
- ensure param-env is const before calling
eval_to_valtree
- fix arch flag on i686-apple-darwin
- give a more helpful error for "
trimmed_def_paths
constructed" - give opaque types a better coherence error
- mark
proc_macro_decls_static
as always used - re-enable
Fn
trait call notation error for non-tuple argument - suggest associated const on possible capitalization mistake
- suggest remove last method call when type coerce with expected type
- miri: data race spans
- switch
#[track_caller]
back to a no-op unless feature gate is enabled - make
VecDeque::new
const - implement
From<bool>
for f32, f64 - add
ptr::from_
{ref
,mut
} - abort immediately on bad
mem::zeroed/uninit
- cargo: fix: deduplicate dependencies by artifact target
- cargo: support vendoring with different revs from same git repo
- add readable rustdoc display for tvOS and watchOS
- clippy: add
permissions_set_readonly_false
lint - clippy: add
size_of_ref
lint - clippy: avoid
match_wildcard_for_single_variants
on guarded wild matches - clippy: fix false positives in
needless_return
when using yeet - clippy: fix
manual_filter
false positive - clippy: fix incorrect suggestion in
suboptimal_flops
- clippy: improve
needless_borrow
,redundant_clone
- rust-analyzer: add xtask for publishing release notes in Markdown on GitHub Releases from a changelog in AsciiDoc
- rust-analyzer: complete enum variants without parens when snippets are disabled
- rust-analyzer: add an option to hide adjustment hints outside of
unsafe
blocks and functions - rust-analyzer: fix binding mode hints always adding parentheses to or-patterns
- rust-analyzer: completion: remove bound insert of type in trait
- rust-analyzer: calculate the
TargetDataLayout
correctly for the selected target - rust-analyzer: correctly check for parentheses redundancy in
remove_parentheses
assist - rust-analyzer: don't let mbe expr fragments match let exprs and inline consts
- rust-analyzer: handle lifetime variables in
CallableSig
query - rust-analyzer: skip adjustment hints if the adjustment is identity (
T
→T
) - rust-analyzer: implement location link for type inlay hints
- rust-analyzer: inline all format arguments where possible
- docs.rs: URL-encode canonical URLs when they can include UTF8 characters
Rust Compiler Performance Triage
A light week with few performance changes, apart from one PR that added some necessary extra work to rustdoc and so we observed a corresponding hit to some doc benchmarks.
Triage done by @pnkfelix. Revision range: 8a746f4a..b38a6d37
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
2.8% | [0.2%, 18.4%] | 14 |
Regressions ❌ (secondary) |
1.3% | [0.2%, 2.6%] | 24 |
Improvements ✅ (primary) |
- | - | 0 |
Improvements ✅ (secondary) |
-0.7% | [-1.1%, -0.3%] | 10 |
All ❌✅ (primary) | 2.8% | [0.2%, 18.4%] | 14 |
3 Regressions, 2 Improvements, 1 Mixed; 1 of them in rollups 44 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 io_error_more
- [disposition: merge] More deriving on packed structs
- [disposition: merge] Tracking Issue for
#![feature(const_socketaddr)]
- [disposition: merge] Add PhantomData marker to Context to make Context !Send and !Sync
- [disposition: merge] Tracking Issue for abstract namespaces in Unix domain sockets
- [disposition: merge] Tracking Issue for const MaybeUninit::as(_mut)_ptr (feature: const_maybe_uninit_as_ptr)
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 2022-12-28 - 2023-01-25 🦀
Virtual
- 2023-01-03 | Virtual (Beijing, CN) | WebAssembly and Rust Meetup (Rustlang)
- 2023-01-03 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 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
- 2023-01-05 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2023-01-10 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-01-11 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2023-01-12 | Virtual (San Francisco, CA, US; Stockholm, SE; New York, NY US) | Microsoft Reactor San Francisco | Microsoft Reactor New York
- 2023-01-12 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2023-01-14 | Virtual | Rust GameDev
- 2023-01-16 | Virtual (San Francisco, CA, US; São Paulo, BR; New York, NY, US) | Microsoft Reactor San Francisco and Microsoft Reactor São Paulo and Microsoft Reactor New York
- 2023-01-17 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-01-17 | Virtual (San Francisco, CA, US; São Paulo, BR, New York, NY, US) | Microsoft Reactor San Francisco and Microsoft Reactor São Paulo and Microsoft Reactor New York
- 2023-01-17 | Virtual (Washington, DC, US) | Rust DC
- 2023-01-18 | Virtual (San Francisco, CA, US; São Paulo, BR; New York, NY US) | Microsoft Reactor San Francisco and Microsoft Reactor São Paulo and Microsoft Reactor New York
- 2023-01-18 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Asia
- 2022-12-29 | Tel Aviv, IL | Rust TLV
Europe
- 2022-12-29 | Freiburg, DE | Arso Collective
- 2023-01-12 | Enschede, NL | Dutch Rust Meetup
- 2023-01-20 | Stuttgart, DE | Rust Community Stuttgart
- 2023-01-25 | Paris, FR | Rust Paris
North America
- 2022-12-28 | Austin, TX, US | Rust ATX
- 2023-01-05 | Lehi, UT, US | Utah Rust
- 2023-01-09 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2023-01-17 | San Francisco, CA, US | San Francisco Rust Study 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
Rust does best when we're ambitious
– Niko Matsakis quoted by Yoshua Wuyts on his blog
llogiq is inordinately pleased with his suggestion and thanks Yoshua for clearing the quote!
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