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
- Electing New Project Directors
- Keeping Rust projects secure with cargo-audit 0.18: performance, compatibility and security improvements
- crates.io Postmortem: User Uploaded Malware
Newsletters
Project/Tooling Updates
- Slint 1.2 Released with Enhanced Platform Abstraction
- Announcing diesel-async 0.4
- git-cliff 1.3.0 is released! (highly customizable changelog generator)
- capnp 0.18 release
- rustc_codegen_gcc: Progress Report #25
- Type-safe Rust-In-Flutter 3.0
- Announcing Nucleo: A fast fuzzy matcher library
- Announcing Freya GUI library
Observations/Thoughts
- Elevate Your Rust Code: The Art of Separating Actions and Calculations
- Are we embedded yet?
- Pavex DevLog #6: designing safe and ergonomic middlewares
- Using Kani to Validate Security Boundaries in AWS Firecracker
- Views on Machine Learning in Rust
- [video] 5 Strong Opinions On Everyday Rust
- [video] Core Flight System Applications in Rust with n2o4
Rust Walkthroughs
- How I finally understood async/await in Rust (part 4: why would I ever want to write a future manually?)
- Use just to run commands in Rust projects
- How to Implement OAuth in Rust
- Integrating a large Tokio-based Rust library with Haskell
- A series of 3 tutorials that walks one through the world of Actors as implemented by 'ractor' framework
- Trying out Rust's Async Functions in Traits
- Implementing a Naive Buffered Queue in Rust
- [video] Raytracing in Rust
- [video] Creating a spectrogram generator - "peer programming" with the Internet
Research
Miscellaneous
- Why Rust is the most admired language among developers
- FFI optimizations and benchmarking
- Becoming a [Rust] contractor
Crate of the Week
This week's crate is str0m, a synchronous sans-IO WebRTC implementation.
Thanks to Hugo Tunius 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.
- Hyperswitch - add domain type for client secret
- Hyperswitch - deserialization error exposes sensitive values in the logs
- Hyperswitch - remove unnecessary function from Refunds Validate Flow
- Ockam - Inconsistent behavior of
ockam tcp-outlet create
- Ockam - Incorrect alias handling in outlet creation
- Ockam - Investigate Github API error in github actions workflows that use nix
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
357 pull requests were merged in the last week
rustc_llvm
: Link tozlib
on dragonfly and solaris- adapt table sizes to the contents, accommodating u64 rmeta offsets
- add
ParallelGuard
type to handle unwinding in parallel sections - add alignment to the NPO guarantee
- add new interface to smir
- add note on non-exhaustiveness when matching on str and nested non-exhaustive enums
- add stable provenance
- also skip musl checks when
BOOTSTRAP_SKIP_TARGET_SANITY
is set - always add
LC_BUILD_VERSION
for metadata object files - avoid stdout redirection on
curl
executions - capture all lifetimes for TAITs and impl trait in associated types
- capture lifetimes for associated type bounds destined to be lowered to opaques
- create a SMIR visitor
- diagnostics: avoid wrong
unused_parens
onx as (T) < y
- parser: not insert dummy field in
struct
- permit recursive weak type aliases
- replace old private-in-public diagnostic with type privacy lints
- return ident for
ExprField
andPatField
HIR nodes - skip rendering metadata strings from
include_str!/include_bytes!
- suggest removing
impl
in generic trait bound position - work around ICE in diagnostics for local super-universes missing
UniverseInfo
s - don't ICE on layout computation failure
- don't forget to normalize the translated message
- don't manually compute param indices when adding implicit
Sized
andConstParamHasTy
- don't record spans for predicates in coherence
- don't suggest adding parentheses to call an inaccessible method
- emit unused doc comment warnings for pat and expr fields
- fix inlining with -Zalways-encode-mir
- fix some issues around ZST handling
- fix the repetitive word
- inline functions called from
add_coverage
- interpret: fix projecting into an unsized field of a local
- lower
Or
pattern without allocating place - make SIGSEGV handler emit nicer backtraces
- make
get_return_block()
returnSome
only for HIR nodes in body - make
termcolor
types public inrustc_errors
- make it more clear what 'Tier 2' (without host tools) means
- miri ABI check: fix handling of 1-ZST; don't accept sign differences
- miri ABI compatibility check: accept u32 and i32
- miri function ABI check: accept
repr(transparent)
wrappers as compatible - miri/diagnostics: don't forget to
print_backtrace
when ICEing on unexpected errors - miri: add '--skip-children' to rustfmt invocation
- miri: make sure we test all tier 1 targets
- encode
DepKind
asu16
- do not compute unneeded query results
- use
OnceLock
forSingleCache
- stabilize
os_str_bytes
feature impl TryFrom<char> for u16
- const-stabilize
is_ascii
- optimize
Take::{fold, for_each}
when wrappingTrustedRandomAccess
iterators - implement
Step
forascii::Char
- make
Cell::swap
panic if the Cells partially overlap - hashbrown: fix two bugs in
clone_from
- hashbrown: migrate from
actions-rs/toolchain@v1
todtolnay/rust-toolchain@master
and removeCross.toml
- regex-automata: reduce regex contention considerably
- regex: upgrade to memchr 2.6 to bring in aarch64 improvements
- codegen_gcc: add support for Link-Time Optimization
- codegen_gcc: add support for
noalias
function parameters - codegen_gcc: only apply NoAlias attribute if optimization is enabled
- cargo install: suggest --git when package name is url
- cargo cli: Help users know possible
--target
values - cargo lints: Fail when overriding inherited lints
- cargo doc: adjust all doc headings one level up
- cargo fewer temporary needless strings
- cargo: add error for unsupported credential provider version
- cargo: improve logout message for asymmetric tokens
- cargo: prepare for partial-version package specs
- cargo: set tracing target for networking messages
- cargo: test: new options of debuginfo are no longer unstable
- rustdoc: Fix type based search
- rustdoc: correctly deal with self ty params when eliding default object lifetimes
- clippy:
implied_bounds_in_impls
: don't ICE on default generic parameter and move to nursery - clippy: add config flag for reborrows in
explicit_iter_loop
- clippy: correctly format
vec!
invocations - clippy: defaultUnionRepresentation: explain why we only warn about unions with at least 2 non-ZST fields
- clippy: don't pass extra generic arguments in
needless_borrow
- clippy: fix span when linting
explicit_auto_deref
immediately afterneedless_borrow
- clippy: new lint:
iter_out_of_bounds
- clippy: new lint:
missing_asserts_for_indexing
- clippy: rewrite
never_loop
as a strict reachability pass - clippy:
never_loop
catchesloop { panic!() }
- clippy: skip
todo!()
innever_loop
- clippy: use multipart suggestions for raw string lints
- rustfmt: fix issues with formatting imports with comments
- rustfmt: fix: reject leading
.
,)
without prefix as item marker
Rust Compiler Performance Triage
A lot of spurious noise this week from a few benchmarks (bitmaps-3.1.0, libc, and even cargo-0.60.0 at a few points). Beyond that, we had a few small improvements associated with the trait system and with parallel-rustc.
Triage done by @pnkfelix. Revision range: cedbe5c7..15e52b05
4 Regressions, 7 Improvements, 8 Mixed; 2 of them in rollups 66 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] rustdoc-search: add support for type parameters
- [disposition: merge] Enable -Zdrop-tracking-mir by default
- [disposition: merge] Stabilize
PATH
option for--print KIND=PATH
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-09-06 - 2023-10-04 🦀
Virtual
- 2023-09-06 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-09-06 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-09-07 | Virtual (Ann Arbor, MI, US) | Michigan Python
- 2023-09-12 - 2023-09-15 | Virtual (Albuquerque, NM, US) | RustConf
- 2023-09-12 | Berlin, DE | OpenTechSchool Berlin
- 2023-09-12 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-09-13 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2023-09-13 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-09-14 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-09-20 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-09-20 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-09-21 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-09-21 | Virtual (Cologne, DE) | Cologne AWS User Group #AWSUGCGN
- 2023-09-21 | Lehi, UT, US | Utah Rust
- 2023-09-21 | Virtual (Linz, AT) | Rust Linz
- 2023-09-21 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-09-25 | Virtual (Dublin, IE) | Rust Dublin
- 2023-09-26 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-10-03 | Buffalo, NY, US | Buffalo Rust Meetup
- 2023-10-04 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
Asia
- 2023-10-03 | Taipei, TW | WebAssembly and Rust Meetup (Wasm Empowering AI)
Europe
- 2023-09-12 | Berlin, DE | Berlin AWS User Group
- 2023-09-12 | Zurich, CH| Rust Zurich
- 2023-09-13 | Cologne, DE | Rust User Group Cologne
- 2023-09-14 | Reading, UK | Reading Rust Workshop
- 2023-09-15 | Stuttgart, DE | Rust Community Stuttgart
- 2023-09-15 | Tiel, NL | Rust, Getting Started
- 2023-09-16 | Brussels, BE | HSBXL
- 2023-09-19 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-09-21 | Aarhus, DK | Rust Aarhus
- 2023-09-21 | Bern, CH | Rust Bern
- 2023-09-26 | Berlin, DE | OpenTechSchool Berlin
- 2023-09-28 | Berlin, DE | React Berlin
North America
- 2023-09-06 | Bellevue, WA, US | The Linux Foundation
- 2023-09-07 | Mountain View, CA, US | Hacker Dojo
- 2023-09-07 | Pasadena, CA, US | Pasadena Thursday Go/Rust
- 2023-09-09 | Mountain View, CA, US | Rust Breakfast and Learn
- 2023-09-12 - 2023-09-15 | Albuquerque, NM, US + Virtual | RustConf
- 2023-09-12 | New York, NY, US | Rust NYC
- 2023-09-12 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2023-09-14 | Seattle, WA, US | Seattle Rust User Group Meetup
- 2023-09-16 | Mountain View, CA, US | Rust Breakfast and Learn
- 2023-09-19 | San Francisco, CA, US | San Francisco Rust Study Group
- 2023-09-21 | Mountain View, CA, US| Mountain View Rust Meetup
- 2023-09-21 | Nashville, TN, US | Music City Rust Developers
- 2023-09-23 | Mountain View, CA, US | Rust Breakfast and Learn
- 2023-09-26 | Pasadena, CA, US | Pasadena Thursday Go/Rust
- 2023-09-27 | Austin, TX, US | Rust ATX
- 2023-09-30 | Mountain View, CA, US | Rust Breakfast and Learn
Oceania
- 2023-09-13 | Perth, WA, AU | Rust Perth
- 2023-09-19 | Christchurch, NZ | Christchurch Rust Meetup Group
- 2023-09-26 | Canberra, ACT, AU | Rust Canberra
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
Rusts standard library, and a lot of the popular crates, are like a museum. While it does change, as new exhibitions are added, it is mostly finished. Each painting has a detailed explanation in 7 different languages underneath. Descriptions below each excitation are written beautifully, with detailed drawings, showing how everything works. It is so easy to navigate, one glance at the map is enough to find exactly what you are looking for. It is so convenient, you almost don't notice that you are learning something.
Internals of
rustc
are like a build site of a sprawling factory. You can see the scaffolds everywhere, as more production lines come online, and everything gets faster, better, bigger. Workers move around, knowing the place like the back of their hands. They can glance at the signs on the walls, and instantly tell you: where you are, what this place does and what pitfalls you should avoid. And you are a new hire who has just came for his first day at the new job. You look at the sign, and after some thinking, you too are able to tell roughly in which building you are. The signs almost always tell you what you need, just in short, cryptic sentences. You always can tell what is going on, with some thinking, but it is not effortless. The signs on the walls are not bad, just not written for anyone to get right away.
Thanks to Alona Enraght-Moony 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