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? Tweet us at @ThisWeekInRust or send us a pull request. Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub. If you find any errors in this week's issue, please submit a PR.
Updates from Rust Community
Official
Project/Tooling Updates
- rust-analyzer changelog #131
- Helix editor 22.05 released
- Slint UI crate weekly updates
- Fornjot (code-first CAD in Rust) - Weekly Dev Log - 2022-W21
- IntelliJ Rust Changelog #171
Observations/Thoughts
- Introducing the Ferrocene Language Specification
- The Rust Jobs Market
- [video] Rust makes you feel like a GENIUS
- [audio] This Week in Rust Issue 443
Rust Walkthroughs
- Impl-tools: beyond derive
- Introduction to Rust generics (1/2): Traits
- Builder Lite
- The curse of strong typing
- Simple rust interview questions
- Profiling heap allocation in rust
- Arc and Mutex in Rust
- How I speeded up my Rust builds on GitHub ~30 times
- Some notes on internal working of profiler
- Rewriting the lexer benchmark in Rust
- Parallel programming design with BipBuffer
- A Neophyte's Introduction to the async/await landscape in Rust
Research
Miscellaneous
Crate of the Week
This week's crate is pgfplots, a crate to generate publication-quality figures (with or without LaTeX).
Thanks to Daniel Duque for the self-suggestion!
Please submit your suggestions and votes for next week!
Call for Participation
Always wanted to contribute to open-source projects but didn't 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.
- mirrord - extract panics on non-existent directories
- mirrord - Support MIRRORD_AGENT_TTL as an argument in the CLI
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
361 pull requests were merged in the last week
- prepare Rust for opaque pointers
- parse expression after
else
as a condition if followed by{
- macros: introduce
fluent_messages
macro - improve error message for E0081
- minor improvement on else-no-if diagnostic
- output correct type responsible for structural match violation
- miri: adjust Miri to also require return places everywhere
- miri: avoid error patterns matching themselves
- miri: enable number validity checking and
ptr::invalid
checking by default - do writeback of Closure params before visiting the parent expression
- implement
Hash
forcore::alloc::Layout
- refactor call terminator to always include destination place
- split out the various responsibilities of
rustc_metadata::Lazy
- try to cache
region_scope_tree
as a query - add a deep
fast_reject
routine - extend
ptr::null
andnull_mut
to all thin (including extern) types - stabilize
cell_filter_map
- partially stabilize (
const_
)slice_ptr_len
feature by stabilizingNonNull::len
- use rounding instead of truncation in float to Duration conversion methods
- improve case conversion happy path
- rustc: fix ICE in native library error reporting
- codegen_gcc: Define immutable statics with const qualified types
- libcore: add
iter::from_generator
which is likeiter::from_fn
, but for coroutines instead of functions - builtins: faster float conversion operations
- clippy: add new lint
unused_rounding
- clippy: add
doc_link_with_quotes
lint - clippy: new lint about use first() instead of get(0)
- clippy: new lint
no_effect_replace
- clippy: support
Weak
inrc_clone_in_vec_init
- clippy:
get_last_with_len
: lintVecDeque
and any deref to slice - clippy: fix
empty_line_after_outer_attribute
false positive - clippy:
identity_op
: add parenthesis to suggestions where required - clippy: introduce
allow-dbg-in-tests
config value - rust-analyzer: add implicit static lifetime hints
- rust-analyzer: generate variant: insert code in file with enum definition
- rust-analyzer: fix overflow during type inference for tuple struct patterns
- rust-analyzer: correct single-file module rename
- rust-analyzer: clear native diagnostics for files when they are deleted
- rust-analyzer: retrigger visibility completion after parentheses
- rust-analyzer:
f32
andf64
representation during lowering - rust-analyzer: make
files.excludeDirs
work
Rust Compiler Performance Triage
A good week: The regressions were small; some have follow-up PR's in flight to
address them; and we saw a big improvement from PR
#97345, which adds more fast
paths for quickly exiting comparisons between two types (such as BitsImpl<M>
and BitsImpl<N>
for const integers M
and N
). This improved compile-times
for the bitmaps
benchmark by 50-65% in some cases (including the trunk
nalgebra
, according to independent investigation from nnethercote). That same
PR had more modest improvements (1% to 2%) to the compile-times for a number of
other crates. Many thanks to lcnr and nnethercote for some excellent work here!
Triage done by @pnkfelix. Revision range: 43d9f385..0a43923a
3 Regressions, 1 Improvements, 9 Mixed; 0 of them in rollups 59 artifact comparisons made in total
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.
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] Tracking Issue for scoped threads
- [disposition: merge] Put a bound on collection misbehavior
- [disposition: merge] Tracking Issue for RFC 3128: I/O Safety
- [disposition: merge] Lang: Stabilize usage of rustc_nonnull_optimization_guaranteed on -1
New and Updated RFCs
Upcoming Events
Rusty Events between 2022-06-01 - 2022-06-29 🦀
Virtual
- 2022-06-01 | Indianapolis, IN, US | Indy Rust
- 2022-06-01 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-06-07 | Beijing, CN | WebAssembly and Rust Meetup (Rustlang)
- 2022-06-07 | Berlin, DE | Berline.rs | Open Tech School Berlin
- 2022-06-07 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-06-08 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-06-08 | Cardiff, UK | Rust and C++ Cardiff
- 2022-06-09 | Dublin, IE | Rust Dublin
- 2022-06-09 | Nürnberg, DE | Rust Nurnberg DE
- 2022-06-09 | San Diego, CA, US | San Diego Rust
- 2022-06-09 | Stuttgart, DE | Rust Community Stuttgart
- 2022-06-11 | Online | Rust Gamedev
- 2022-06-14 | Dallas, TX, US | Dallas Rust
- 2022-06-14 | Rostock, DE | Altow Academy
- 2022-06-15 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-06-15 | Vancouver, BC, CA | Vancouver Rust
- 2022-06-21 | Washington, DC, US | Rust DC
- 2022-06-28 | Dallas, TX, US | Dallas Rust
- 2022-06-29 | Stuttgart, DE | Rust Community Stuttgart
- 2022-06-30 | Linz, AT | Rust Linz
North America
- 2022-06-01 | Austin, TX, US | Rust ATX
- 2022-06-08 | Atlanta, GA, US | Rust ATL
- 2022-06-09 | Columbus, OH, US | Columbus Rust Society
- 2022-06-21 | San Francisco, CA, US | San Francisco Rust Study Group
- 2022-06-29 | Austin, TX, US | ATX Rustaceans
Europe
- 2022-06-09 | Edinburgh, UK | Rust Edinburgh
- 2022-06-09 | Oslo, NO | Rust Oslo
- 2022-06-14 | Stuttgart, DE | Rust Community Stuttgart
- 2022-06-21 | Oslo, NO | Rust Oslo
Oceania
- 2022-06-17 | Melbourne, VIC, AU | Rust Melbourne
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.
Rust Jobs
Element
Quickwit
Micropelt
Stockly
Audiotool
Zcash Foundation
Bolt Labs
- Cryptographic Engineer at Bolt Labs (Remote, US)
- Senior Software Engineer (Rust) at Bolt Labs (Remote, US)
- Software Engineer (Rust) at Bolt Labs (Remote, US)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Rust is a perfect language for a dad like me, who every day puts kids to sleep, and tired after long day of work and chores, can sit down and possibly write some code for the hobby open source project, even when he's already just half awake. And it usually just works, tend to be robust and make the day feel extra productive.
– Dawid Ciężarkiewicz on /r/rust
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.
Email list hosting is sponsored by The Rust Foundation