Warning
This post was published 163 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 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.
This week's crate is scandir, a high-performance file tree scanner.
Thanks to Marty B. for the self-suggestion!
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.
dqy
alternative to dig
If you are a Rust project owner and are looking for contributors, please submit tasks here.
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 submission website through a PR to TWiR.
432 pull requests were merged in the last week
Instance::mono
multiple timesstatic_mut_refs
: use raw pointers to remove the remaining FIXMEunicode-table-generator
outputVecGraph
+ miscNeverToAny
Self
kw resolves to DefKind::{Mod,Trait}
eval_body_using_ecx
precise_captures
(impl use<'...>
)ParamEnv
s with the same InferCtxtnon_local_definitions
lint-C strip
on MSVCPROBLEMATIC_CONSTS
generalizationimpl Trait
to specify its captures explicitly (feature(precise_capturing)
)adjust_alloc_base_pointer
before_memory_deallocation
wasm-c-abi
flagsuggest_deref_closure_return
more idiomatic/easier to understandthir_tree
and thir_flat
into hooksReturnDest
variants doc commentsmut
doesn't reset binding modedefault_hidden_visibility: false
from wasm targetsParamTy
/ParamConst
/EarlyParamRegion
/AliasTy
by refVec::len
is invariant across growthRUST_BACKTRACE=1,
add a special note for Miri's env var isolationdata_race
: make the release/acquire API more clearno_std
works on Windows nowlocaltime_r
shimhandle_alloc_error
__rust_alloc_error_handler
read_byte_slice
to general helpers file, next to read_c_str
Box::into_raw
: make Miri understand that this is a box-to-raw castPatRangeBoundary::compare_with
: also add a fast-path for signed integersconst_io_structs
--check-cfg
optionNonZero
checked
ops emit unchecked LLVM operations where feasiblestd::fs::Metadata
Debug representationf16
and f128
constantsiter::ArrayChunks::into_remainder
checked_ilog
: improve performanceptr::from_raw_parts(_mut)
str::from_raw_parts_mut mut
RwLock
on more platformsPassMode::Indirect
with paramsget_fn
for a variableCG_RUSTFLAGS
when building sysroot[project]
in Edition 2024_
fied variants (e.g. dev_dependencies
) as deprecatedlist_files()
with gix is triggeredthreadlocal_initializer_can_be_made_const
will not trigger for unreachable initializersarithmetic_side_effects
fix false negative on +=
ptr_as_ptr
: fix duplicate diagnosticsneedless_pass_by_ref_mut
lint on self
arguments as wellis_test_module_or_function
single_char_pattern
to only lint on ascii charsmultiple_unsafe_ops_per_block
test needs asm!
BeginPanic
handling in const eval--nocapture
A week dominated by small mixed changes to perf with improvements slightly outweighing regressions. There were no pure regressions, and many of the mixed perf results were deemed worth it for their potential improvements to runtime performance through further optimization from LLVM.
Triage done by @rylev. Revision range: ccfcd950..a77f76e2
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.4% | [0.2%, 1.8%] | 57 |
Regressions ❌ (secondary) |
0.4% | [0.2%, 1.9%] | 26 |
Improvements ✅ (primary) |
-0.8% | [-3.4%, -0.2%] | 50 |
Improvements ✅ (secondary) |
-0.6% | [-1.9%, -0.1%] | 32 |
All ❌✅ (primary) | -0.2% | [-3.4%, 1.8%] | 107 |
0 Regressions, 5 Improvements, 6 Mixed; 2 of them in rollups 62 artifact comparisons made in total
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.
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.
std::path::absolute
NonNull
!
fall back to !
Rusty Events between 2024-04-24 - 2024-05-22 🦀
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
The learning curve for Rust is relatively steep compared to other languages, but once you climb it you'll never look down.
Thanks to BD103 for the self-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