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
Project/Tooling Updates
- Rerun 0.18 - Exploiting column chunks for faster ingestion and lower memory use
srgn 0.13
: new grep-like search mode for source code
Observations/Thoughts
- Expanding on withoutboat’s pinned places
- Introducing datafusion-uwheel, A Native DataFusion Optimizer for Time-based Analytics
- What is a place expression?
- Arenas
- 4 Years of Bevy
- Fixing Incorrect Tracing Parent Spans with Futures and JoinSet in Rust
Rust Walkthroughs
- Rust GUI library via Flutter, done simple
- [Series] Mastering Dependency Injection in Rust: Using a macro part 1
Miscellaneous
- The amazing Rust podcasts that have emerged in 2024
- FreeBSD considers Rust in the base system
- Incorporating Lua with Livtet
- [video] Systems Software for Linux with Rust – Interview with Zeeshan Ali Khan
- Building A Spreadsheet in Rust, WASM, and WebGL
Crate of the Week
This week's crate is discret, a graphQL-based peer-to-peer implementation library.
Thanks to adsalais 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
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.
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
426 pull requests were merged in the last week
- add powerpc-unknown-linux-muslspe compile target
-Znext-solver
cachingParamEnvAnd::fully_perform
: we have anocx
, use itderive(SmartPointer)
: register helper attributes- alloc: add ToString specialization for
&&str
- allow to customize
// TODO
: comment for deprecated safe autofix - check that
#[may_dangle]
is properly applied - cloneToUninit impls
- delete debuginfo test suite infra for gdb without Rust support and lldb with Rust support
- detect incompatible CI rustc options more precisely
- detect multiple crate versions on method not found
- emit a warning instead of an error if
--generate-link-to-definition
is used with other output formats than HTML - emit an error for invalid use of the linkage attribute
- fix
is_val_statically_known
for floats - fix order of normalization and recursion in const folding
- fix problems with assoc expr token collection
- fix projections when parent capture is by-ref but child capture is by-value in the
ByMoveBody
pass - fix wrong argument for
get_fn_decl
- fix wrong source location for some incorrect macro definitions
- include a copy of
compiler-rt
source in thedownload-ci-llvm
tarball - infer async closure args from
Fn
bound even if there is no correspondingFuture
bound on return - only try to modify file times of a writable file on Windows
- prevent double panic in query system, improve diagnostics
- print more verbose error for commands that capture output
- record the correct target type when coercing fn items/closures to pointers
- refactor
powerpc64
call ABI handling - remove
print::Pat
from the printing ofWitnessPat
- remove redundant type ops:
Eq
/Subtype
- return correct
HirId
when finding body owner in diagnostics - rework MIR inlining debuginfo so function parameters show up in debuggers
- safe transmute: check lifetimes
- special-case alias ty during the delayed bug emission in
try_from_lit
- suggest adding Result return type for associated method in E0277
- support reading thin archives in ArArchiveBuilder
- switch to using the v2 resolver in most workspaces
- unconditionally allow shadow call-stack sanitizer for AArch64
- use
FnSig
instead of rawFnDecl
forForeignItemKind::Fn
, fix ICE forFn
trait error on safe foreign fn - use
ar_archive_writer
for writing COFF import libs on all backends - use the
enum2$
Natvis visualiser for repr128 C-style enums - when deduplicating unreachable blocks, erase the source information
- added "copy" to Debug fmt for copy operands
- miri: FD: remove big surrounding RefCell, simplify socketpair
- miri:
tls_leak_main_thread_allowed
: make test checktarget_thread_local
- miri: add 'project' process guidlines for larger contributions
- miri: add epoll EPOLLHUP flag support
- miri: add epollerr support
- miri: borrow tracking: remove the concept of a call ID
- miri: epoll
test_socketpair_read
: explicitly check real and Miri behavior - miri: epoll: iterate through output buffer then fetch an event from ready list
- miri: implement epoll shim
- miri: implement pipe and pipe2
- miri: make unused states of Reserved unrepresentable
- miri: set EINVAL for
epoll_wait
maxevent value 0 - shrink
TyKind::FnPtr
- stabilize
Ready::into_inner()
- stabilize
asm_const
- stabilize
is_none_or
- stabilize
raw_ref_op
(RFC 2582) - stabilize
std::thread::Builder::spawn_unchecked
- stabilize
unsafe_attributes
CommandExt::before_exec
: deprecate safety in edition 2024std::fs: get_mode
implementation for all unix- add
#[must_use]
attribute toCoroutine
trait - implement DoubleEnded and ExactSize for
Take<Repeat>
andTake<RepeatWith>
- hash Ipv*Addr as an integer
- optimize integer
pow
by removing the exit branch - std: refactor UNIX random data generation
- add windows-targets crate to std's sysroot
- cargo: add
--lockfile-path
flag - cargo: correct diagnostic for
TomlDebugInfo
- cargo: doc: convert comments to rustdoc in workspace
- cargo: fix MSRV for workspace .package and .dependencies
- cargo: fix: remove list owners feature of info subcommand
- cargo: implement path-bases (RFC 3529) 1/n: path dep and patch support
- rustdoc: greatly speed up doctests by compiling compatible doctests in one file
- rustdoc: remove useless attributes in merged doctest generated code
- rustdoc: add possibility to generate rustdoc JSON output to stdout
- rustdoc-json: use FxHashMap from
rustdoc_json_types
- rustfmt: ensure that
fn config_path
returns canonicalized paths - clippy: disable
assigning_clones
for tests - clippy: fix false positive in
explicit_iter_loop
with msrv - clippy: improve
collapsible_match
error message syntax - clippy: remove
find_format_arg_expr
AST fallback - clippy: trigger
string_slice
if expression is reference to&str
- rust-analyzer: add scip/lsif flag to exclude vendored libaries
- rust-analyzer:
min_exhaustive_patterns
- rust-analyzer: implement lifetime inferring
- rust-analyzer: make rust-analyzer work partially when offline
- rust-analyzer: fix panics for semantic highlighting at startup
- rust-analyzer: include generics when lowering extern type
- rust-analyzer: keep comments in
convert_while_to_loop
- rust-analyzer: panic when a TAIT exists in a RPIT
- rust-analyzer: panic while canonicalizing erroneous projection type
- rust-analyzer: panic while hovering associated function with type annotation on generic param that not inherited from its container type
- rust-analyzer: properly account for editions in names
- rust-analyzer: fix wrong BoundVar index when lowering impl trait parameter of parent generics
Rust Compiler Performance Triage
A fairly noisy week (though most of that has been dropped from this report). Overall we saw several improvements, and ended the week on a net positive. Memory usage is down around 1.5-3% over the course of the week, primarily due to RawVec polymorphization and CloneToUninit impl expansion.
Triage done by @simulacrum. Revision range: 9cb1998e..4fe1e2bd
1 Regressions, 1 Improvements, 3 Mixed; 1 of them in rollups 53 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] crates.io: Crate Deletions
Tracking Issues & PRs
Rust
- [disposition: merge] impl
Default
forHashMap
/HashSet
iterators that don't already have it - [disposition: merge] stabilize const_fn_floating_point_arithmetic
- [disposition: merge] Non-exhaustive structs may be empty
- [disposition: merge] Lint at
deny-by-default
against references tostatic mut
Cargo
- [disposition: merge] feat: Stablize
CARGO_RUSTC_CURRENT_DIR
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
Upcoming Events
Rusty Events between 2024-08-21 - 2024-09-18 🦀
Virtual
- 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) | Rust in Israel
- 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 (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 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
- 2024-09-12 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-09-12 | Virtual (Rotterdam, NL)| Bevy Game Development
- 2024-09-16 | Virtual | Women in Rust
- 2024-09-18 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-09-18 - 2024-09-20 | Hybrid - Virtual and In-Person (Vienna, AT) | Linux Plumbers Conference
Africa
- 2024-09-06 | Kampala, UG | Rust Circle Kampala
Asia
- 2024-08-24 | Bangalore, IN | Rust Bangalore
- 2024-09-09 | Ramat Gan, IL | Coralogix
Europe
- 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
- 2024-09-18 | Moravia, CZ | Rust Moravia
- 2024-09-18 | Vienna, AT + Virtual | Linux Plumbers Conference
North America
- 2024-08-21 | Hybrid - Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-08-22 | Mountain View, CA, US | Mountain View Rust Meetup
- 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
- 2024-09-18 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
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
I'm trying to round up to next power of two (for fun).
I know that's perhaps not a lot of fun, but there's next_power_of_two() on all integer types.
That is indeed less fun.
– Edeadlink and Riccardo Borgani on rust-users
Thanks to Jonas Fassbender 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