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.
Updates from Rust Community
Foundation
RustNL 2024
- Visual Application Design for Rust - Rik Arends
- ThRust in Space: Initial Momentum - Michaël Melchiore
- Arc in the Linux Kernel - Alice Ryhl
- Making Connections - Mara Bos
- Replacing OpenSSL One Step at a Time - Joe Birr-Pixton
- Fortifying Rust's FFI with Enscapsulated Functions - Leon Schuermann
- Oxidizing Education - Henk Oordt
- Postcard: An Unreasonably Effective Tool for Machine to Machine Communication - James Munns
- Introducing June - Sophia Turner
- Robius: Immersive and Seamless Multiplatform App Development in Rust - Kevin Boos
- Compression Carcinized: Implementing zlib in Rust - Folkert de Vries
- K23: A Secure Research OS Running WASM - Jonas Kruckenberg
- Async Rust in Embedded Systems with Embassy - Dario Nieuwenhuis
- Xilem: Let's Build High Performance Rust UI - Raph Levien
- Rust Poisoning My Wrist for Fun - Ulf Lilleengen
- Type Theory for Busy Engineers - Niko Matsakis
Newsletters
Project/Tooling Updates
- Enter paradis — A new chapter in Rust's parallelism story
- Tiny Glade, VJ performances, and 2d lighting
- Diesel 2.2.0
- Pigg 0.1.0
- git-cliff 2.3.0 is released! (highly customizable changelog generator)
Observations/Thoughts
- The borrow checker within
- Don't Worry About Lifetimes
- rust is not about memory safety
- On Dependency Usage in Rust
- Context Managers: Undroppable Types for Free
- Rust and dynamically-sized thin pointers
- Rust is for the Engine, Not the Game
- [audio] Thunderbird - Brendan Abolivier, Software Engineer
Rust Walkthroughs
- Build with Naz : Rust typestate pattern
- How to build a plugin system in Rust
- Forming Clouds
- Rust error handling: Option & Result
- Let's build a Load Balancer in Rust - Part 3
- The Ultimate Guide to Rust Newtypes
Miscellaneous
Crate of the Week
This week's crate is layoutparser-ort, a simplified port of LayoutParser for ML-based document layout element detection.
Despite there being no suggestions, llogiq is reasonably happy with his choice. Are you?
No matter what your answer is, 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
- No calls for testing were issued this week.
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.
No Calls for participation in projects were submitted this week.
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.
- Scientific Computing in Rust 2024 | Closes 2024-06-14 | online | Event date: 2024-07-17 - 2024-07-19
- Rust Ukraine 2024 | Closes 2024-07-06 | Online + Ukraine, Kyiv | Event date: 2024-07-27
- Conf42 Rustlang 2024 | Closes 2024-07-22 | online | Event date: 2024-08-22
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
308 pull requests were merged in the last week
-Znext-solver
: eagerly normalize when adding goalsfn_arg_sanity_check
: fix panic message- add
--print=check-cfg
to get the expected configs - add
-Zfixed-x18
- also InstSimplify
&raw*
- also resolve the type of constants, even if we already turned it into an error constant
- avoid unwrap diag.code directly in
note_and_explain_type_err
- check index
value <= 0xFFFF_FF00
- coverage: avoid overflow when the MC/DC condition limit is exceeded
- coverage: optionally instrument the RHS of lazy logical operators
- coverage: rename MC/DC
conditions_num
tonum_conditions
- create const block DefIds in typeck instead of ast lowering
- do not equate
Const
's ty insuper_combine_const
- do not suggest unresolvable builder methods
- a small diagnostic improvement for
dropping_copy_types
- don't recompute
tail
inlower_stmts
- don't suggest turning non-char-literal exprs of ty
char
into string literals - enable DestinationPropagation by default
- fold item bounds before proving them in
check_type_bounds
in new solver - implement
needs_async_drop
in rustc and optimize async drop glue - improve diagnostic output of
non_local_definitions
lint - make
ProofTreeBuilder
actually generic overInterner
- make
body_owned_by
return theBody
instead of just theBodyId
- make
repr(packed)
vectors work with SIMD intrinsics - make lint:
lint_dropping_references lint_forgetting_copy_types lint_forgetting_references
give suggestion if possible - omit
non-needs_drop drop_in_place
in vtables - opt-in to
FulfillmentError
generation to avoid doing extra work in the new solver - reintroduce name resolution check for trying to access locals from an inline const
- reject
CVarArgs
inparse_ty_for_where_clause
- show files produced by
--emit foo
in json artifact notifications - silence some resolve errors when there have been glob import errors
- stop using
translate_args
in the new solver - support mdBook preprocessors for TRPL in rustbook
- test codegen for
repr(packed,simd)
→repr(simd)
- tweak relations to no longer rely on
TypeTrace
- unroll first iteration of
checked_ilog
loop - uplift
{Closure,Coroutine,CoroutineClosure}Args
and friends torustc_type_ir
- use parenthetical notation for
Fn
traits - add some more specific checks to the MIR validator
- miri: avoid making a full copy of all new allocations
- miri: fix "local crate" detection
- don't inhibit random field reordering on
repr(packed(1))
- avoid checking the edition as much as possible
- increase vtable layout size
- stabilise
IpvNAddr::
{BITS
,to_bits
,from_bits
} (ip_bits
) - stabilize
custom_code_classes_in_docs
feature - stablize
const_binary_heap_constructor
- make
std::env::
{set_var
,remove_var
} unsafe in edition 2024 - implement feature
integer_sign_cast
- NVPTX: avoid
PassMode::Direct
for args in C abi - genericize
ptr::from_raw_parts
std::pal::unix::thread
fetching min stack size on netbsd- add an intrinsic for
ptr::metadata
- change
f32::midpoint
to upcast to f64 - rustc-hash: replace hash with faster and better finalized hash
- cargo test: Auto-redact elapsed time
- cargo add: Avoid escaping double-quotes by using string literals
- cargo config: Ensure
--config net.git-fetch-with-cli=true
is respected - cargo new: Dont say were adding to a workspace when a regular package is in root
- cargo toml: Ensure targets are in a deterministic order
- cargo vendor: Ensure sort happens for vendor
- cargo: allows the default git/gitoxide configuration to be obtained from the ENV and config
- cargo: adjust custom err from cert-check due to libgit2 1.8 change
- cargo: skip deserialization of unrelated fields with overlapping name
- clippy:
many_single_char_names
: deduplicate diagnostics - clippy: add
needless_character_iteration
lint - clippy: deprecate
maybe_misused_cfg
andmismatched_target_os
- clippy: disable
indexing_slicing
for customIndex
impls - clippy: fix
redundant_closure
suggesting incorrect code withF: Fn()
- clippy: let
non_canonical_impls
skip proc marco - clippy: ignore array from
deref_addrof
lint - clippy: make
str_to_string
machine-applicable - rust-analyzer: add
Function::fn_ptr_type(…)
for obtaining name-erased function type - rust-analyzer: don't mark
#[rustc_deprecated_safe_2024]
functions as unsafe - rust-analyzer: enable completions within derive helper attributes
- rust-analyzer: fix container search failing for tokens originating within derive attributes
- rust-analyzer: fix diagnostics clearing when flychecks run per-workspace
- rust-analyzer: only generate snippets for
extract_expressions_from_format_string
if snippets are supported - rustfmt: collapse nested if detected by clippy
- rustfmt: rustfmt should not remove inner attributes from inline const blocks
- rustfmt: rust rewrite
check_diff
(Skeleton) - rustfmt: use
with_capacity
inrewrite_path
Rust Compiler Performance Triage
A quiet week; we did have one quite serious regression (#115105, "enable DestinationPropagation by default"), but it was shortly reverted (#125794). The only other PR identified as potentially problematic was rollup PR #125824, but even that is relatively limited in its effect.
Triage done by @pnkfelix. Revision range: a59072ec..1d52972d
3 Regressions, 5 Improvements, 6 Mixed; 4 of them in rollups 57 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
Tracking Issues & PRs
Rust
- [disposition: merge] Allow constraining opaque types during subtyping in the trait system
- [disposition: merge] TAIT decision on "may define implies must define"
- [disposition: merge] Stabilize Wasm relaxed SIMD
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team RFCs 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 RFCs 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-06-05 - 2024-07-03 🦀
Virtual
- 2024-06-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-06-06 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-06-06 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-06-09 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-06-11 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-06-12 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2024-06-13 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-06-13 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-06-16 | Virtual (Tel Aviv, IL) | Code Mavens
- 2024-06-18 | Virtual (Washington, DC, US) | Rust DC
- 2024-06-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2024-06-20 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-06-25 | Virtual (Dallas, TX, US)| Dallas Rust User Group
- 2024-06-27 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-07-02 | Virtual (Buffalo, NY) | Buffalo Rust Meetup
- 2024-07-03 | Virtual | Training 4 Programmers LLC
- 2024-07-03 | Virtual (Indianapolis, IN, US) | Indy Rust
Europe
- 2024-06-05 | Hamburg, DE | Rust Meetup Hamburg
- 2024-06-06 | Madrid, ES | MadRust
- 2024-06-06 | Vilnius, LT | Rust Vilnius
- 2024-06-06 | Wrocław, PL | Rust Wroclaw
- 2024-06-11 | Copenhagen, DK | Copenhagen Rust Community
- 2024-06-11 | Paris, FR | Rust Paris
- 2024-06-12 | Reading, UK | Reading Rust Workshop
- 2024-06-18 | Frankfurt/Main, DE | Rust Frankfurt Meetup
- 2024-06-19 - 2024-06-24 | Zürich, CH | RustFest Zürich
- 2024-06-20 | Aarhus, DK | Rust Aarhus
- 2024-06-25 | Gdańsk, PL | Rust Gdansk
- 2024-06-27 | Berlin, DE | Rust Berlin
- 2024-06-27 | Copenhagen, DK | Copenhagen Rust Community
North America
- 2024-06-08 | Somerville, MA, US | Boston Rust Meetup
- 2024-06-11 | New York, NY, US | Rust NYC
- 2024-06-12 | Detroit, MI, US | Detroit Rust
- 2024-06-13 | Spokane, WA, US | Spokane Rust
- 2024-06-17 | Minneapolis, MN US | Minneapolis Rust Meetup
- 2024-06-18 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-06-20 | Seattle, WA, US | Seattle Rust User Group
- 2024-06-26 | Austin, TX, US | Rust ATC
- 2024-06-27 | Nashville, TN, US | Music City Rust Developers
Oceania
- 2024-06-14 | Melbourne, VIC, AU | Rust Melbourne
- 2024-06-20 | Auckland, NZ | Rust AKL
- 2024-06-25 | Canberra, ACt, AU | Canberra Rust User Group (CRUG)
South America
- 2024-06-06 | Buenos Aires, AR | Rust en Español | Rust Argentina
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
Every PR is Special™
– Hieyou Xu describing being on t-compiler review rotation
Sadly, there was no suggestion, so llogiq came up with something hopefully suitable.
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