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
Project/Tooling Updates
- Announcing axum 0.7.0
- Announcing general availability of the AWS SDK for Rust
- ripgrep 14.0.0
- Improved Multithreading in wgpu - Arcanization Lands on Trunk
- Introducing SALT: A Rust error tutor, seeking participants in a study of errors!
- Bionic GPT - Chat GPT replacement built in Rust
- cargo-run-bin: Why does everyone install crates globally?
- CXX-Qt: On the Road to Stability, improved signals support and more in release 0.6
- Oatmeal: Terminal UI to chat with large language models (LLM) using different model backends, and integrations with your favourite editors!
Observations/Thoughts
- Project Goals
- poll_next
- [video] but what is 'a lifetime?
- [audio] Recruiting in Rust with Cedric Sellmann
Rust Walkthroughs
- Designing a SIMD Algorithm from Scratch
- Why Enums in Rust feel so much better
- How I Use Declarative Macros in Rust
- Embassy on ESP: Getting Started
- Intro to LLVM and MLIR with Rust and Melior
- Investigating crazy compile times
- [video] Rust Course (Part 2) (Bahasa Indonesia).
Research
Miscellaneous
Crate of the Week
This week's crate is tokio-graceful, a library for graceful shutdown of tokio-based async servers.
Thanks to Glen De Cauwsemaecker for the suggestion!
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.
- Hyperswitch - [REFACTOR]: [Nuvei] MCA metadata validation
- Hyperswitch - [Features]: [Noon] Sync with Hyperswitch Reference
- Hyperswitch - [Features]: [Payme] Sync with Hyperswitch Reference
- Hyperswitch - [BUG]: MCA metadata deserialization failures should be 4xx
- Hyperswitch - [REFACTOR]: [Stripe] Error Message For Connector Implementation
- Ockam - Library - Slim down the
NodeManagerWorker
fornode / node status
- Ockam - Command - refactor to use typed interfaces to implement commands for
kafka services
- Ockam - Library - Validate CBOR structs according to the cddl schema for
nodes/models/transport
andnodes/models/workers
- r3bl-open-core - [tuify] API change the return type of
select_from_list()
3 - r3bl-open-core - Improve "Bug report" issue template
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
405 pull requests were merged in the last week
- stabilize dyn upcasting coercion (RFC #3324)
- add an experimental feature gate for function delegation
- enable Rust to use the EHCont security feature of Windows
- enable profiler in dist-powerpc64-linux
- enable the Arm Cortex-A53 errata mitigation on aarch64-unknown-none
- remove now deprecated target
x86_64-sun-solaris
EvalCtxt::commit_if_ok
don't inherit nested goalsintercrate_ambiguity_causes
: handle self ty infer + reservation impls- add
Span
toTraitBoundModifier
- add
debug_assert_nounwind
and convertassert_unsafe_precondition
- add allow-by-default lint for unit bindings
- allow defining opaques in
check_coroutine_obligations
- call
FileEncoder::finish
in rmeta encoding - coverage: simplify building coverage expressions based on sums
- do not erase late bound regions when selecting inherent associated types
- don't ICE when ambiguity is found when selecting
Index
implementation in typeck - don't ICE when encountering placeholders in implied bounds computation
- don't consider generic args of supertrait in
deref_into_dyn_supertrait
lint - don't require intercrate mode for negative coherence
- eagerly compute
output_filenames
- fix early param lifetimes in
generic_const_exprs
- fixes error count display is different when there's only one error left
- improve tool-only help for multiple
#[default]
variants - make PlaceholderReplacer
shallow_resolver
and recur when infer vars - note about object lifetime defaults in does not live long enough error
- print query map for deadlock when using parallel front end
- relate Inherent Associated Types using eq
- remove
--check-cfg
checking of command line--cfg
args - remove
HirId
fromQPath::LangItem
- separate
NaN
/Inf
floats with_
- suggest swapping the order of
ref
andbox
- the unadjusted ABI needs to pass aggregates by-value
- tighten up link attributes for llvm-wrapper bindings
- typeck break expr even if break is illegal
- use an absolute path to the NUL device
- when failing to import
core
, suggeststd
- add
VarDebugInfo
to Stable MIR - add support for global allocation in smir
- fix smir's
Ty::Ref
pretty printing - expand Miri's BorTag GC to a Provenance GC
- validate there are no critical call edges in optimized MIR
- miri: GC the
dead_alloc_map
too - miri: check that target features required by LLVM intrinsics are enabled
- miri: refactor
float_to_int_checked
to remove its generic parameter and reduce code duplication a bit - cache flags for
ty::Const
- indicate that multiplication in
Layout::array
cannot overflow - rewrite exhaustiveness in one pass
AmbiguityCause
should not eagerly format strings- specialize
SpecFromElem
for()
- refactor
binary_search_by
to use conditional moves - stabilize
ptr::addr_eq
- add
BufRead::skip_until
- kmc-solid: I/O safety
- add
Duration::abs_diff
- non null convenience ops
- hashbrown: specialize
fold
implementation of iterators - cranelift: implement another batch of vendor intrinsics
- cargo:
refactor(toml)
: Better abstract inheritance details - cargo: exited with hard error when custom build file no existence or not in package
- cargo: add
CARGO_RUSTC_CURRENT_DIR
(unstable) - cargo: use custom error instead of anyhow
- cargo: review and remove ignored tests in rustfix
- cargo: try running on windows
- rustdoc-search: add support for traits and associated types
- rustdoc-search: avoid infinite where clause unbox
- rustdoc-search: simplify
checkPath
andsortResults
- rustdoc: sort unstable items last instead of first
- rustfix: add notice that rustfix has moved
- clippy:
TypeckResults::node_type()
can be used inside of bodies - clippy:
deprecated_semver
: Allow#[deprecated(since = "TBD")]
- clippy:
manual_try_fold
: check thatfold
is reallyIterator::fold
- clippy:
missing_asserts_for_indexing
: work with bodies instead of blocks separately - clippy:
needless_return_with_question_mark
: don't lint if never type is used for coercion - clippy:
ptr_arg
: recognize methods that also exist on slices - clippy: add new
check_private_items
config - clippy: create new lint
option_map_or_err_ok
- clippy: don't suggest
a.mul_add(b, c)
if parameters are not float - clippy: extend
result_map_or_into_option
lint to handleResult::map_or_else(|_| None, Some)
- clippy: fix
box_default
behaviour with emptyvec![]
coming from macro arg - clippy: fix
iter_kv_map
false positiveinto_keys
andinto_values
suggestion - clippy: improve error messages format
- clippy: remove underscore check for
manual_non_exhaustive
lint - clippy: suggest alternatives to iterate an array of ranges
- clippy: use absolute path for
declare_tool_lint
indeclare_clippy_lint
- rust-analyzer: cancelable initialization
- rust-analyzer: editor/code: add option to suppress internal error notifications
- rust-analyzer: ensure renames happen after edit
- rust-analyzer: fix variant resolve for type alias
- rust-analyzer: fix: add fallback for completion label details
- rust-analyzer: fix: better resolve assoc item with type bound
- rust-analyzer: fix: dedup duplicate crates with differing origins in CrateGraph construction
- rust-analyzer: fix: remove parenthesis should ensure space
- rust-analyzer: improve completion label details display
- rust-analyzer: replace
option.map(cond) == Some(true)
withoption.is_some_and(cond)
Rust Compiler Performance Triage
A good week, despite a few PRs that pnkfelix opted not to mark as triaged. In particular, a broad set of primary benchmarks improved, due to improvements to resolve (PR #118188) and a one-pass rewrite of exhaustiveness (PR #117611).
Triage done by @pnkfelix. Revision range: 4f3da903..df0295f0
1 Regressions, 5 Improvements, 5 Mixed; 2 of them in rollups 84 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] Macro fragment specifiers edition policy
Tracking Issues & PRs
- [disposition: merge] [rustdoc] Add highlighting for comments in items declaration
- [disposition: merge] generalize: handle occurs check failure in aliases
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guideline RFCs entered Final Comment Period this week.
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-29 - 2023-12-27 🦀
Virtual
- 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
- 2023-12-06 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-12-10 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-12-12 | Virtual | Mainmatter
- 2023-12-12 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-12-14| Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-12-14 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-12-17 | Virtual (Tel Aviv, IL) | Code Mavens
- 2023-12-18 | Virtual (Munich, DE) | Rust Munich
- 2023-12-19 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-12-20 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Asia
- 2023-12-16 | Delhi, IN | Rust Delhi
Europe
- 2023-11-30 | Brussels, BE | Lambda Brussels
- 2023-11-30 | Copenhagen, DK | Copenhagen Rust Community
- 2023-11-30 | Vienna, AT | Rust Vienna
- 2023-11-30 | Zurich, CH | Rust Zurich
- 2023-12-06 | Cologne, DE | Rust Cologne
- 2023-12-07 | Aarhus, DK | Rust Aarhus
- 2023-12-07 | Lille, FR | Rust Lille
- 2023-12-14 | Augsburg, DE | Rust - Modern Systems Programming in Leipzig
- 2023-12-18 | Munich, DE + Virtual | Rust Munich
- 2023-12-19 | Heidelberg, DE | Nix Your Bugs & Rust Your Engines
- 2023-12-19 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
North America
- 2023-11-29 | Chicago, IL, US | Deep Dish Rust
- 2023-11-30 | Mountain View, CA, US | Mountain View Rust Meetup
- 2023-12-07 | Seattle, WA, US | Seattle Rust User Group
- 2023-12-12 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
- 2023-12-12 | New York, NY, US | Rust NYC
- 2023-12-19 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2023-11-28 | Canberra, ACT, AU | Rust Canberra
- 2023-12-05 | Aukland, NZ | Rust AKL
- 2023-12-11 | Perth, WA, AU | Rust Perth Meetup Group
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'd like to report that Rust's compile times were OK today and yesterday and the day before.
I'll keep you posted.
– ZiCog about slow Rust compile times on rust-users
Thanks to Michael Bryan 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