Warning
This post was published 50 days ago. The information described in this article may have changed.
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.
This week's crate is binsider, a terminal UI tool for analyzing binary files.
Despite yet another week without suggestions, llogiq is appropriately pleased with his choice.
Please submit your suggestions and votes for next week!
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:
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.
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!
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!
451 pull requests were merged in the last week
loongarch64-unknown-linux-ohos
cfg_match
Generalize inputsio_error_inprogress
featureadt_const_params
leaking {type error}
in error msgasm!()
is a macro calllet_underscore_drop
on type without Drop
implementationclashing_extern_declarations
considering generic args for ADT fieldSized
bound on fn argument, point at type instead of patternlate_bound_vars
in diagnostic codeINADDR_ANY
in join_multicast_v4
cfg!(...)
and --check-cfg
standalone
doctest attribute into standalone_crate
arc4random_buf
shim for freebsd/solarish platformsreturn_read_bytes_and_count
and return_written_byte_count_or_error
get_parent_item
when possibleconst_cell_into_inner
const_intrinsic_copy
const_refs_to_static
option_get_or_insert_default
to_lowercase
/ to_uppercase
functionsFile
constructors that return files wrapped with a buffermust_use
attribute to len_utf8
and len_utf16
optimize_for_size
variants for stable and unstable sort as well as select_nth_unstable
read_buf
uses in std
make_ascii_uppercase
and make_ascii_lowercase
in [u8]
and str
as constoptimize_for_size
and 16-bit targetsstd::net
to wasi-libc on wasm32-wasip2 targetRUST_EXCEPTION_CLASS
from native-endian bytesget_many_mut
APIsSetMatches::matched_all
autolib
$CARGO_HOME/config
CARGO_MANIFEST_PATH
env variablecargo check --message-format json
clean::Item
lessfield@
and variant@
doc-link disambiguatorsstyle_edition
2027wildcard_in_or_patterns
will no longer be triggered for types annotated with #[nonexhaustive]
invalid_null_ptr_usage
: fix false positives for std::ptr::slice_from_raw_parts
functions//@no-rustfix
annotationsneedless_lifetimes
to suggest eliding impl
lifetimesexpect(clippy::needless_return)
no longer triggers false positive--print
/-Vv
requests in clippy-driver
unused_async
lintOption<&T>
instead of &Option<T>
&Option<T>
to Option<&T>
std_or_core
to determine the correct prefixcfg(test)
A quiet week without too many perf. changes, although there was a nice perf. win on documentation builds thanks to [#130857](https://github.com/rust-lang/rust/. Overall the results were positive.
Triage done by @kobzol. Revision range: 4cadeda9..c87004a1
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.5% | [0.2%, 0.8%] | 11 |
Regressions ❌ (secondary) |
0.3% | [0.2%, 0.6%] | 19 |
Improvements ✅ (primary) |
-1.2% | [-14.9%, -0.2%] | 21 |
Improvements ✅ (secondary) |
-1.0% | [-2.3%, -0.3%] | 5 |
All ❌✅ (primary) | -0.6% | [-14.9%, 0.8%] | 32 |
3 Regressions, 4 Improvements, 3 Mixed; 2 of them in rollups 47 artifact comparisons made in total
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
Every week, the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now.
cargo install
respect lockfiles by defaultCARGO_TARGET_DIR
to make it the parent of all target directoriesDuration
methodsResult
methodsOption
functionsslice_first_last_chunk
feature (slice::{split_,}{first,last}_chunk{,_mut}
)map
/value
methods on ControlFlow
!
to diverge, disallow coercions from them tooconst {slice,array}::from_mut
feature(const_slice_split_at_mut)
str::from_utf8
_unchecked_mut as a const fn
#![feature(const_unsafecell_get_mut)]
#![feature(const_float_classify)]
pin_deref_mut
UnsafeCell::from_mut
BufRead::skip_until
Rusty Events between 2024-10-02 - 2024-10-30 🦀
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.
Please see the latest Who's Hiring thread on r/rust
Just to provide another perspective: if you can write the programs you want to write, then all is good. You don't have to use every single tool in the standard library.
I co-authored the Rust book. I have twelve years experience writing Rust code, and just over thirty years of experience writing software. I have written a macro_rules macro exactly one time, and that was 95% taking someone else's macro and modifying it. I have written one proc macro. I have used Box::leak once. I have never used Arc::downgrade. I've used Cow a handful of times.
Don't stress yourself out. You're doing fine.
Thanks to Jacob Finkelman 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
🏷️ Rust_feed