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 X (formerly 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.
Want TWIR in your inbox? Subscribe here.
Updates from Rust Community
Official
Newsletters
Project/Tooling Updates
- Bevy's Fourth Birthday
- Intoducing Tonbo
- This Month in Xilem, July 2024
- Rust GPU Transitions to Community Ownership
- rust-analyzer changelog #246
- Ringboard: a new clipboard manager for Linux
- derive_more 1.0.0 - Finally a stable release
- Aura 4.0: Port from Haskell to Rust complete (Migration Guide, Why Rust?)
r3bl_terminal_async
v0.5.6 releasedr3bl_tui
v0.5.7 released
Observations/Thoughts
- I compared 14 hashing algorithms on Rust using Criterion
- Rust's Mutex, Atomics and UnsafeCell – Spooky Action at a Distance?
- How I Created 175 Fonts Using Rust
- The weird of function-local types in Rust
- Fear Not the Association of Types: a walkthrough of associated types
- Programming vs Software Engineering (Rust vs Go)
- [video] The Best Games from Bevy Jam 5
- [audio] I Was Wrong About Rust Build Times
- [audio] Rust in Production Podcast Season 2 Finale
- [audio] Exploring Fiberplane's 3-Year Rust Journey, with Benno van den Berg
Rust Walkthroughs
Research
- Don’t Write, but Return: Replacing Output Parameters with Algebraic Data Types in C-to-Rust Translation
- The Hitchhiker’s Guide to Building an Encrypted Filesystem in Rust
Miscellaneous
- RP2350 Launch Blog
- July 2024 Rust Jobs Report
- [video] John Nunley discusses Rust, Open source, smol-rs and Async Programming
- [Audio] Supercharging Python Tooling – An Interview with Charlie Marsh
- [Audio] Systems Software for Linux with Rust – Interview with Zeeshan Ali Khan
Crate of the Week
This week's crate is rencfs, a FUSE-based encrypted filesystem for Linux.
Thanks to Radu Marias for the self-suggestion!
Please submit your suggestions and votes for next week!
Calls 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:
RFCs
- RFC: Make Cargo respect minimum supported Rust version (MSRV) when selecting dependencies
- Testing Steps
Rust
- No calls for testing were issued this week.
Rustup
- No calls for testing were issued 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.
Call for Participation; projects and speakers
CFP - Projects
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.
- Diesel - Add support for currently unsupported array functions
- Diesel - Provide a r2d2::CustomizeConnection for testing
- Mysqlclient-sys - Add support for mysql-client 9.0
- rencfs-desktop - Use SurrealDB
- rencfs-desktop - Implement daemon
- rencfs-desktop - Implement functionality
If you are a Rust project owner and are looking for contributors, please submit tasks here or through a PR to TWiR or by reaching out on X (formerly Twitter) or Mastodon!
CFP - Events
Are you a new or experienced speaker looking for a place to share something cool? This section highlights events that are being planned and are accepting submissions to join their event as a speaker.
If you are an event organizer hoping to expand the reach of your event, please submit a link to the website through a PR to TWiR or by reaching out on X (formerly Twitter) or Mastodon!
Updates from the Rust Project
395 pull requests were merged in the last week
- promote aarch64-apple-darwin to Tier 1
- enable zstd for debug compression
- use stable sort to sort multipart diagnostics
nontemporal_store
: make sure that the intrinsic is truly just a hintrustc_codegen_ssa
: Set architecture for object crate for 32-bit SPARCrustc_lint
: makelet-underscore-lock
translatableunused_parens
: do not lint against parens around &raw- add -Zmetrics-dir=PATH to save diagnostic metadata to disk
- add
builder-config
into tarball sources - add implied target features to
target_feature
attribute - add range attribute to scalar function results and arguments
- cache supertrait outlives of impl header for soundness check
- change generate-copyright to generate HTML, with cargo dependencies included
- codegen: better centralize function declaration attribute computation
- consider
cfg_attr
checked byCheckAttrVisitor
- const vector passed through to codegen
- diagnostics: do not warn when a lifetime bound infers itself
- differentiate between methods and associated functions in diagnostics
- disable verbose bootstrap command failure logging by default
- disallow setting some built-in cfg via the command-line
- don't ICE when getting an input file name's stem fails
- don't arbitrarily choose one upper bound for hidden captured region error message
- don't implement
AsyncFn
forFnDef
/FnPtr
that wouldnt implementFn
- don't inline tainted MIR bodies
- emit an error for invalid use of the
#[no_sanitize]
attribute - ensure let stmt compound assignment removal suggestion respect codepoint boundaries
- fallback to string formatting if source is not available for lint
- fix ICE Caused by Incorrectly Delaying E0107
- fix
ElaborateBoxDerefs
on debug varinfo - ensure
Guard
'sdrop
method is removed atopt-level=s
for…
- improve
Ord
viulation help - interpret: refactor function call handling to be better-abstracted
- link
std
statically inrustc_driver
- linker: remove the "
--whole-archive
in test mode" backcompat hack - more information for fully-qualified suggestion when there are multiple impls
- normalize
struct
tail properly fordyn
ptr-to-ptr casting in new solver - on trait bound mismatch, detect multiple crate versions in dep tree
- only suggest
#[allow]
for--warn
and--deny
lint level flags - only walk ribs to collect possibly shadowed params if we are adding params in our new rib
- pass the right
ParamEnv
tomight_permit_raw_init_strict
- skip over args when determining if async-closure's inner coroutine consumes its upvars
- miri-script: use --remap-path-prefix to print errors relative to the right root
- miri: make vtable addresses not globally unique
- miri:
throw_unsup_format
for alignment greater than 2^29 - miri: allow all code to call
getuid()
- miri: don't panic on
miri_print_borrow_state()
under-Zmiri-disable-stacked-borrows
- miri: josh: wait until the socket is ready
- stabilize
min_exhaustive_patterns
- std: do not overwrite style in
get_backtrace_style
std::thread: set_name
implementation proposal for vxWorks- introduce PinCoerceUnsized trait to core
- core: optimise Debug impl for
ascii::Char
- add
f16
andf128
math functions - impl
Default
for collection iterators that don't already have it - implement
BufReader::peek
- apply "polymorphization at home" to
RawVec
- make
LocalWaker::will_wake
consistent withWaker::will_wake
- configure
f16
andf128
support for WebAssembly - cargo: trim-paths: rustdoc supports trim-paths for diagnostics
- cargo: vendor: strip excluded build targets
- cargo: don't specify the depedency name in the
cargo add
inferred name test - cargo: add
info
cargo subcommand - cargo: fix renamed disallowed cfg lint name
- cargo: fix:
cargo package
failed on bare commit git repo - cargo: infer registry
- cargo: use context instead of
with_context
- cargo: use longhand gitoxide path-spec patterns
- rustdoc-search: account for numeric disambiguators on impls
- rustdoc: do not run doctests with invalid langstrings
- rustdoc: Stop showing impl items for negative impls
- rustdoc: strip unreachable modules
- fix rustdoc missing handling of remap-path-prefix option
- clippy:
macro_metavars_in_unsafe
: recognize metavariables in tail expressions - clippy:
single_match
: fix checking of explicitly matched enums - clippy: add lint for
unused_result_ok
- clippy: add path prefixes back when compiling
clippy_dev
andlintcheck
- clippy: add settings menu on clippy lints page
- clippy: don't walk the HIR tree when checking for a const context
- clippy: fix case where
doc_markdown
is triggered on words ending with "ified" - clippy: lintcheck: disable doc links
- clippy: lintcheck: key lints on line start rather than byte start/end
- clippy: remove more
snippet_opt
calls - clippy: respect allow
inconsistent_struct_constructor
on thestruct
definition - rust-analyzer: allow rust-project.json to be hidden
- rust-analyzer: implement TAIT and fix ATPIT a bit
- rust-analyzer: build and run build scripts in lsif command
- rust-analyzer: correctly support
#[rustc_deprecated_safe_2024]
- rust-analyzer: fix
find_path
not respecting non-std preference config correctly - rust-analyzer: fix unconfigured diagnostic being attached to the wrong file for modules
- rust-analyzer: fix missing non-exhaustive
let
diagnostics inside async or unsafe block - rust-analyzer: fix native diagnostics not working
- rust-analyzer: fix panic while rendering function type hint with impl trait arg
- rust-analyzer: resolve included files to their calling modules in IDE layer
- rust-analyzer: remove trailing excess comma in "Convert to named struct" assist
- rust-analyzer: tyck for non-ADT types when searching refs for
Self
kw - rust-analyzer: include vendored crates in StaticIndex
- rust-analyzer: only keep lib/ in publish-libs
- rust-analyzer: reuse recursion limit as expansion depth limit
Rust Compiler Performance Triage
A big week for compiler performance brought on mostly by statically linking the std library into rustc_driver
instead of dynamic linking. This overshadows all other improvements and regressions that were seen this week.
Triage done by @rylev. Revision range: 8c7e0e16..9cb1998e
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
- | - | 0 |
Regressions ❌ (secondary) |
- | - | 0 |
Improvements ✅ (primary) |
-1.3% | [-2.9%, -0.2%] | 217 |
Improvements ✅ (secondary) |
-1.4% | [-4.9%, -0.2%] | 196 |
All ❌✅ (primary) | -1.3% | [-2.9%, -0.2%] | 217 |
2 Regressions, 2 Improvements, 2 Mixed; 1 of them in rollups 35 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
Rust
- [disposition: merge] Tracking Issue for
iter::repeat_n()
(feature(iter_repeat_n)
) - [disposition: merge] Tracking Issue for CharIndices::offset function
- [disposition: merge] Stabilize
unsafe_attributes
- [disposition: merge] Stabilize opaque type precise capturing (RFC 3617)
- [disposition: merge] CloneToUninit impls
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team Tracking Issues or PRs entered Final Comment Period this week.
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guideline Tracking Issues or PRs entered Final Comment Period this week.
New and Updated RFCs
- No New or Updated RFCs were created this week.
Upcoming Events
Rusty Events between 2024-08-14 - 2024-09-11 🦀
Virtual
- 2024-08-15 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-08-20 | Virtual (Washington, DC, US) | Rust DC
- 2024-08-21 | Hybrid - Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-08-22 | Virtual | Conf42: Online Tech Events
- 2024-08-22 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-08-22 | Virtual (Karlsruhe, DE) | Karlsruhe Functional Programmers Group
- 2024-08-27 | Virtual | Ardan Labs
- 2024-08-27 | Virtual (Bordeaux, FR) | Rust Bordeaux
- 2024-08-27 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-08-27 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-08-28 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-08-29 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-08-29 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-09-03 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2024-09-04 | Virtual (Indianapolis, IN, US) | Rust
- 2024-09-05 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-09-10 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-09-10 - 2024-09-13 | Hybrid: Virtual and In-Person (Montreal, QC, CA)| Rust Conf
Africa
- 2024-09-06 | Kampala, UG | Rust Circle Kampala
Asia
- 2024-08-24 | Bangalore, IN | Rust Bangalore
Europe
- 2024-08-14 | Köln/Cologne, DE | Rust Cologne
- 2024-08-14 | Reading, UK | Reading Rust Workshop
- 2024-08-20 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2024-08-20 | Aarhus, DK | Rust Aarhus
- 2024-08-21 | Cabridge, UK | Cambridge Rust Meetup
- 2024-08-21 | Nürnberg, DE | Rust Nuremberg
- 2024-08-22 | Manchester, UK | Rust Manchester
- 2024-08-26 | Mainz, DE | Fachschaft Mathematik+Informatik der JGU Mainz
- 2024-08-27 | Trondheim, NO | Rust Trondheim
- 2024-08-28 | Frankfurt (Main), DE | Rust Rhein Main
- 2024-08-29 | Berlin, DE | OpenTechSchool Berlin + Rust Berlin
- 2024-09-11 | Reading, UK | Reading Rust Workshop
North America
- 2024-08-19 | Minneapolis, MN US | Minneapolis Rust Meetup
- 2024-08-20 | New York, NY, US | Rust NYC
- 2024-08-20 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-08-21 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-08-26 | Boulder, CO, US | Boulder Rust Meetup
- 2024-08-28 | Austin, TX, US | Rust ATC
- 2024-08-29 | Nashville, TN, US | Music City Rust Developers
- 2024-09-05 | Mountain View, CA, US | Mountain View Rust Meetup
- 2024-09-05 | St. Louis, MO, US | STL Rust
- 2024-09-10 - 2024-09-13 | Hybrid: Virtual and In-Person (Montreal, QC, CA)| Rust Conf
Oceania
- 2024-08-22 | Auckland, NZ | Rust AKL
- 2024-08-27 | Canberra, ACT, AU | Canberra Rust User Group (CRUG)
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
We are living through Rust finding its more "complete" form while still being an actually useful production language.
Given a woeful lack of suggestions, llogiq is reasonably pleased with his choice.
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