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 and archives can be viewed at this-week-in-rust.org. If you find any errors in this week's issue, please submit a PR.
Updates from Rust Community
Official
- Faster compilation with the parallel front-end in nightly
- November 2023 Leadership Council Update
- Our Vision for the Rust Specification
Foundation
Project/Tooling Updates
- Slint 1.3 Released with Revamped Native Styles and JavaScript API
- rustc_codegen_gcc: Progress Report #27
- rust-analyzer changelog #207
- breadcrumbs 0.1.4
Observations/Thoughts
- Why Rust in Production?
- Building a Web App in Rust
- Rust without crates.io
- How I Improved My Rust Compile Times by 75%
- Iterator as an Alias
- What is a team?
Rust Walkthroughs
- Building and Deploying A Static Site Generator
- Tracking the current active process in Windows with Rust
- Edge IoT with Rust on ESP: MQTT Subscriber
- Building a Central Authentication Server with Rust, PostgreSQL, Kafka and gRPC
- I Got a Milk-V Duo (and It’s Running Rust)
- [video] An Introduction to Veilid, by Christien Rioux
- [video] Code in Rust with RustRover, by Vitaly Bragilevsky
- [video] Create a Dummy GitHub CLI in Rust!
Miscellaneous
Crate of the Week
This week's crate is cargo-msrv, a cargo subcommand to find out the Minimum Supported Rust Version (MSRV) of your crate.
llogiq is a bit worried about not having received suggestions for two weeks in a row, but still offers you his choice.
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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
364 pull requests were merged in the last week
- speed up
x clean
- llvm-wrapper: remove include of non-existant Vectorize.h
rustc_llvm
: Link to libkstat on Solaris/SPARC- add -Zcross-crate-inline-threshold=yes
- add
std::hash::{DefaultHasher, RandomState}
exports - add a new
download-ci-llvm = if-unchanged
option and enable it by default forprofile = codegen
- allow configuring the parent GitHub repository
- build a better MIR body when errors are encountered
- compute layout with spans for better cycle errors in coroutines
- compute polonius loan scopes over the region graph
- coverage: avoid creating malformed macro name spans
- coverage: rename the
run-coverage
test mode tocoverage-run
- deny more
~const
trait bounds - extend builtin/auto trait args with error when they have >1 argument
- format macro const literals with pretty printer
- generator layout: ignore fake borrows
- give a better diagnostic for missing parens in Fn* bounds
- handle the case when the change-id isn't found
- improve diagnostic for const ctors in array repeat expressions
- make
FatalErrorMarker
lower priority than other panics - on method chain expression failure, look for missing method in earlier segments of the chain
- only instantiate binder during dyn's built-in trait candidate probe once
- only use
normalize_param_env
when normalizing predicate incheck_item_bounds
- patterns: reject raw pointers that are not just integers
- recover from incorrectly ordered/duplicated function keywords
- reorder checks to make sure potential missing expect on Option/Result…
- restore rustc shim error message
- catch stray
{
in let-chains - suggest removing
;
for;
within let-chains - thir unsafeck fixes
- warn when using an unstable feature with -Ctarget-feature
- when not finding assoc fn on type, look for builder fn
- miri:
data_race
: link to docs for 'unusual' race conditions - miri: freebsd adding getentropy interception support
- miri: implement round.ps and round.pd SSE4.1 intrinsics
- miri: share getentropy shim across various unixes
- miri: treat thread-local statics on main thread as static roots for leakage analysis
- emit
#[inline]
onderive(Debug)
- stabilize
result_option_inspect
- move
BorrowedBuf
andBorrowedCursor
fromstd:io
tocore::io
- closure-consuming helper functions for
fmt::Debug
helpers - don't panic in
<BorrowedCursor as io::Write>::write
- futures: provide a non-destructive mechanism to determine if a sink/stream are paired
- codegen-cranelift: implement AArch64 intrinsics necessary for simd-json
- codegen-cranelift: implement AES-NI and SHA256 crypto intrinsics using inline asm
- codegen-cranelift: implement a lot of SIMD intrinsics
- codegen_gcc: do not emit
.eh_frame
section if using -Cpanic=abort - cargo:
query
{_vec
} useIndexSummary
- cargo: add better error message when it can not find the search section
- cargo: add cache garbage collection
- cargo credential: include license files in all published crates
- cargo: do not allow empty feature name
- cargo: make browser links out of HTML file paths
- cargo: filter
cargo-credential-*
dependencies by OS - cargo: fix
--quiet
being used with nested subcommands - cargo: fix non-deterministic behavior in last-use repopulation
- cargo: do not panic when failed to parse rustc commit-hash
- cargo: preserve jobserver file descriptors on rustc invocation in
fix_exec_rustc
- cargo: report more detailed semver errors
- rustdoc: properly elide cross-crate host effect args
- clippy:
arc_with_non_send_sync
Improve suggested resolution - clippy:
map_identity
: respect match ergonomics - clippy:
mod_module_files
Don't emit lint for mod.rs in tests - clippy: add type details to
unnecessary_fallible_conversions
note - clippy: destructure
Conf
inregister_lints
- clippy: disable
vec_box
when using different allocators - clippy: don't check for late-bound vars, check for escaping bound vars
- clippy: fixes to
manual_let_else
's divergence check - clippy: lint
needless_borrow
andexplicit_auto_deref
on most union field accesses - clippy: move
suspicious_doc_comments
to doc pass - clippy: replace
if_chain
with let chains - rust-analyzer: add config for preferring / ignoring prelude modules when inserting imports
- rust-analyzer: preview adt field when hover
- rust-analyzer: find
Self
reference - rust-analyzer: ignore
doc(hidden)
attr if no body is present - rust-analyzer: truncate closure capture place for raw pointer
- rust-analyzer: improve check for include macro
Rust Compiler Performance Triage
A week dominated by one particular perf improvement that lead to huge performance gains - an avg of 5% improvement across 121 test cases! The perf improvement comes from adding an #[inline]
hint to the output from #[derive(Debug)]
which presumably allows the compiler to more easily do deadcode elimination reducing the binary size and the amount of code that actually needs to be code-gened.
Triage done by @rylev. Revision range: 7b97a5ca..173b6e68
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.4% | [0.2%, 0.9%] | 10 |
Regressions ❌ (secondary) |
1.9% | [0.2%, 3.6%] | 12 |
Improvements ✅ (primary) |
-5.6% | [-49.2%, -0.1%] | 111 |
Improvements ✅ (secondary) |
-3.5% | [-25.0%, -0.2%] | 155 |
All ❌✅ (primary) | -5.1% | [-49.2%, 0.9%] | 121 |
2 Regressions, 2 Improvements, 3 Mixed; 3 of them in rollups 55 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
- [disposition: merge] RFC: Superseding public/private dependencies
Tracking Issues & PRs
- [disposition: merge] Tracking Issue for mutex_unpoison
- [disposition: merge] Tracking issue for dyn upcasting coercion
- [disposition: merge] rustdoc-search: add support for traits and associated types
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guidelines entered Final Comment Period this week.
New and Updated RFCs
- [new] Add named path bases to cargo (v2)
- [new] RFC: Associated const underscore
- [new] Add forbidden function casts RFC
- [new] Struct target features RFC
- [new] Create 0000-cargo-dns.md
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-11-15 - 2023-12-13 🦀
Virtual
- 2023-11-15 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-11-15 | Virtual (Richmond, VA, US) | Linux Plumbers Conference
- 2023-11-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-11-16 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-11-16 | Virtual (San Diego, CA, US) | San Diego Rust
- 2023-11-16 | Virtual (Vilnius, LT) | Vilnius Rust and Go Meetup Group
- 2023-11-21 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-11-21 | Virtual (Washington, DC, US) | Rust DC
- 2023-11-23 | Virtual (Edmonton, AB, CA) | Edmonton R User Group - Yegrug
- 2023-11-28 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-11-29 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-11-30 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-11-30 | Virtual (Dublin, IE) | Rust Dublin
- 2023-12-01 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-12-02 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2023-12-05 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-12-05 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
Europe
- 2023-11-21 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-11-23 | Biel/Bienne, CH | Rust Bern
- 2023-12-07 | Aarhus, DK | Rust Aarhus
- 2023-11-30 | Brussels, BE | Lambda Brussels
North America
- 2023-11-15 | Richmond, VA, US + Virtual | Linux Plumbers Conference
- 2023-11-16 | Mountain View, CA, US | Mountain View Rust Meetup
- 2023-11-16 | Nashville, TN, US | Music City Rust Developers
- 2023-11-16 | Seattle, WA, US | Seattle Rust User Group
- 2023-11-21 | San Francisco, CA, US | San Francisco Rust Study Group
- 2023-11-22 | Austin, TX, US | Rust ATX
- 2023-11-28 | Pasadena, CA, US | Pasadena Thursday Go / Rust
- 2023-12-12 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
Oceania
- 2023-11-21 | Christchurch, NZ | Christchurch Rust Meetup Group
- 2023-11-28 | Canberra, ACT, AU | Rust Canberra
- 2023-12-11 | Perth, WA, AU | Rust Perth Meetup 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
I decided to keep learning Rust because I liked the syntax. I liked the speed. I liked the community. I liked it all. It felt like a breath of fresh air: a syntax more intuitive than Python, JavaScript, or C, yet still faster.
Thanks to Goren Barak for the self-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