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
Newsletters
Project/Tooling Updates
- rust-libp2p v0.53 has been released
- Zellij 0.39.0 released
- Officially Qualfied - Ferrocene
- Rocket's 4th v0.5 Release Candidate
Observations/Thoughts
- Writing Rust Bindings for My Python App
- A four year plan for async Rust
- Cursed Rust: Printing Things The Wrong Way
- Rust for JavaScript Developers: An Overview of Testing
- Why Golang instead of Rust to develop the Krater desktop app
- Google Rewriting Android's Binder In Rust With Promising Results
- Dump Rust Struct or Enum Memory Representation as Bytes
- How Open Source Projects are Using Kani to Write Better Software in Rust
- Creating High Performance Asynchronous Backends With Burn-Compute
- Goodbye Python, Hello Rust: Building a RAG CLI Application with Orca
- Variadic generics, again
- Using Rust, Chrome and NixOS to Take Headless Screenshots for Social Sharing
- sudo-rs' first security audit
- Destructing trees safely and cheaply
- Edge IoT with Rust on ESP: NTP
Rust Walkthroughs
Miscellaneous
- Migrating SecureDrop’s PGP backend from GnuPG to Sequoia
- [video] 10x faster - taking charge of the compiler backend
- [video] RISC-V Vector Extension in Rust
- Embedding simple CSV file in Rust application
Crate of the Week
This week's crate is floem, a native Rust UI library with fine-grained reactivity.
Despite receiving no suggestions, llogiq is reasonably pleased with 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.
- Ockam - Make
ockam identity delete
(no args) interactive by asking the user to choose from a list of identity names to delete (tuify) - Ockam - Make
ockam tcp-outlet delete
(no args) interactive by asking the user to choose from a list of tcp-outlet aliases to delete (tuify) - Ockam - Make
ockam project show
(no args) interactive by asking the user to choose from a list of projects to show (tuify)
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
366 pull requests were merged in the last week
dropck_outlives
check whether generator witnessneeds_drop
- account for
ref
andmut
in the wrong place for pattern ident renaming - add a stable MIR visitor
- add all RPITITs when augmenting param-env with GAT bounds in
check_type_bounds
- add diagnostic items for a few of core's builtin macros
- add support for pre-unix-epoch file dates on Apple platforms
- add the
Span
of themove
keyword to the HIR - also consider TAIT to be uncomputable if the MIR body is tainted
- avoid the path trimming ICE lint in error reporting
- avoid unnecessary comparison in
partition_equal
- check binders with bound vars for global bounds that don't hold
- consts: remove dead code around
i1
constant values - coverage: replace impossible
coverage::Error
with assertions - derive
TyEncodable
/TyDecodable
inrustc_type_ir
- detect misparsed binop caused by missing semi
- detect object safety errors when assoc type is missing
- do not ICE on constant evaluation failure in GVN
- do not assert in
op_to_const
- don't check for alias bounds in liveness when aliases have escaping bound vars
- don't emit delayed good-path bugs on panic
- don't pass
-stdlib=libc++
when building C files on macOS - enable cross-crate-inlining when MIR inlining is enabled
- enable parallel rustc front end in nightly builds
- fallback for
construct_generic_bound_failure
- fix excessive initialization and reads beyond EOF in
io::copy(_, Vec<u8>)
specialization - fix incorrect trait bound restriction suggestion
- fix order of implementations in the "implementations on foreign types" section
- guarantee representation of None in NPO
- guarantee that
char
has the same size and alignment asu32
- hint optimizer about try-reserved capacity
- inline and remove
create_session
- make sure that predicates with unmentioned bound vars are still considered global in the old solver
- make the randomize feature of
rustc_abi
additive - match usize/isize exhaustively with half-open ranges
- prepopulate opaque ty storage before using it
- pretty print
Fn
traits inrustc_on_unimplemented
- recover from missing param list in function definitions
- refactor: move suggestion functions from demand to suggestions
- remove obsolete support for linking unwinder on Android
- remove support for alias
-Z symbol-mangling-version
- remove support for compiler plugins
- replace switch to unreachable by assume statements
- set
max_atomic_width
for riscv32*-esp-espidf to 32 - turn
const_caller_location
from a query to a hook - use
FxIndexSet
in the symbol interner - use derivative for
Clone
/PartialOrd
/Ord
/Hash
inrustc_type_ir
- use global cache when computing proof trees
- use the correct span when emitting the
env!
result - warn users who set
non_exhaustive_omitted_patterns
lint level on a match arm - when encountering unclosed delimiters during lexing, check for diff markers
- enable src/math for all UEFI targets
- intrinsics macro: fix non-weak aeabi generation
- this enables math module for riscv32 targets
- stabilize
const_maybe_uninit_zeroed
andconst_mem_zeroed
- stabilize
file_set_times
- fix
switch_stdout_to
on Windows7 - add
track_caller
totransmute_copy
- delegate
<Box<E> as Error>::provide
to<E as Error>::provide
- support
enum
variants inoffset_of!
- feature gate enums in
offset_of
- override
Waker::clone_from
to avoid cloningWaker
s unnecessarily - codegen_gcc: fix vector compilation error
- cargo:
feat(trim-paths)
: set envCARGO_TRIM_PATHS
for build scripts - cargo toml: Pull out the schema
- cargo: fix an unhelpful panic message
- cargo: implement
-Ztrim-paths
(RFC #3127) - cargo: merge
trim-paths
from different profiles - rustdoc: accept less invalid Rust
- rustfmt: fixes comma added to comment in where-clause
- clippy:
unused_enumerate_index
: don't ICE on empty tuples - clippy: add
unused_enumerate_index
lint - clippy: fix
dbg_macro
semi span calculation - clippy: fix
enum_variant_names
depending lint depending on order - clippy: fix
get_first
false negative for VecDeque - clippy: new lint:
unnecessary_fallible_conversions
- rust-analyzer: add
generate_mut_trait_impl
assist - rust-analyzer: import trait with alias
- rust-analyzer: skip checking token tree count for include! macro call
- rust-analyzer: fix docs path for derive macros
- rust-analyzer: vSCode metadata. category:formatters
Rust Compiler Performance Triage
A difficult week for triage, due to what appears to be system-level disruption to measurement apparatus, yielding transient noise (and potentially masking actual problems). The main non-noise performance change was huge regression to bitmaps introduced by PR 117131, and that already has a fix in-flight fix (PR #117542). The other thing worth noting is that the parallel rustc front-end has been enabled in the nighlty builds, which has introduced some overhead that was expected by wg-parallel-rustc.
Triage done by @pnkfelix. Revision range: 650991d6..7b97a5ca
10 Regressions, 4 Improvements, 3 Mixed; 3 of them in rollups 68 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:
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] Add T: ?Sized to
RwLockReadGuard
andRwLockWriteGuard
's Debug impls. - [disposition: merge] Tracking Issue for
file_create_new
- [disposition: merge] feat: implement
DoubleEndedSearcher
forCharArray[Ref]Searcher
- [disposition: merge] TAIT defining scope options
- [disposition: merge] Add
std::hash::{DefaultHasher, RandomState}
exports (needs FCP)
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
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-11-08 - 2023-12-06 🦀
Virtual
- 2023-11-08 | Virtual(Boulder, CO, US) | Solid State Depot - The Boulder Makerspace
- 2023-11-09 | Virtual (Linz, AT) | Rust Linz
- 2023-11-09 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-11-10 | Virtual (Bangalore, IN) | Learn Everything About Programming
- 2023-11-12 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens
- 2023-11-14 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-11-14 | Virtual (Kyiv, UA) | Yalantis Education
- 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 (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-09 | Barcelona, ES | BcnRust
- 2023-11-09 | Paris, FR | Paris Rustaceans
- 2023-11-09 | Reading, UK | Reading Rust Workshop
- 2023-11-21 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2023-11-23 | Biel/Bienne, CH | Rust Bern
North America
- 2023-11-08 | Boulder, CO, US | Boulder Rust Meetup
- 2023-11-14 | New York, NY, US | Rust NYC
- 2023-11-14 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
- 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
Oceania
- 2023-11-21 | Christchurch, NZ | Christchurch Rust Meetup Group
- 2023-11-28 | 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
For Binder to continue to meet Android's needs, we need better ways to manage (and reduce!) complexity without increasing the risk.
The biggest change is obviously the choice of programming language. We decided to use Rust because it directly addresses a number of the challenges within Binder that we have faced during the last years.
– Alice Ryhl on the Linux Kernel Mailing List
Thanks to Vincent de Phily 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