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
Foundation
Newsletters
Project/Tooling Updates
- What's new in axum 0.5
- rust-analyzer changelog #123
- Slint (GUI crate) weekly update
- Fornjot (Code-CAD in Rust) - Weekly Dev Log - 2022-W13
- Introducing StarfishQL - visualizing the dependency network on crates.io
- This week in Fluvio #27: the programmable streaming platform
- Rust on Espressif chips - 04-04-2022
- GCC Rust Monthly Report #15 March 2022
- Progress Report #10: rustc_codegen_gcc can now bootstrap rustc!
- youki 0.0.3 has been released, with WASM support
- Coppers - A test harness that measures the energy usage of your Rust projects
Observations/Thoughts
- The Tower of Weakenings: Memory Models For Everyone - Faultlore
- hyper 1.0 roadmap
- Why Rust mutexes look like they do
- Improving Python S3 Client Performance with Rust
- Qiskit now includes Rust for better performance
- Why We’re Porting Our Database Drivers to Async Rust
- The Chronicles of a Web3 philosopher.
- [audio] Rusty Engine
Rust Walkthroughs
- Futures Nostalgia
- A Rust web server / frontend setup like it's 2022 (with axum and yew)
- Rust's fearless concurrency in practice
- [video] Rust multi-threading code review
Miscellaneous
- A Computer Science Curriculum with Rust flavor
- Tracking the JWST: Programming/Language Issues
- Ferrous Systems and Espressif’s Rust Training on ESP32
- RUST! #[proc_macros] zine
Crate of the Week
This week's crate is bet, a library of binary expression trees.
Thanks to Denys Séguret 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
311 pull requests were merged in the last week
- include a header in .rlink files
- make lowering pull-based
- make GATs object safe under generic_associated_types_extended feature
- lazy type-alias-impl-trait take two
- allow large Size again
- reduce max hash in raw strings from
u16
tou8
- a new matcher representation for use in
parse_tt
- yet more
parse_tt
improvements - simplify
MatcherPos
some more - reduce unnecessary escaping in
proc_macro::Literal::character
/string
- remember mutability in
DefKind::Static
- ast_lowering: stop wrapping
ident
matchers into groups - convert more
DefId
s toLocalDefId
- miri: add
-Zmiri-strict-provenance
- add error message suggestion for missing
noreturn
in naked function - add note to the move size diagnostic
- add suggestion to borrow
Fn
andFnMut
params/opaque/closures instead of move - add the
generic_associated_types_extended
feature - better suggestions for
Fn
-family trait selection errors - don't ICE when opaque types get their hidden type constrained again
- don't emit non-asm contents error for naked function composed of errors
- fix double drop of allocator in
IntoIter impl of Vec
- improve method name suggestions
- specialize infinite-type "insert some indirection" suggestion for Option
- suggest
i += 1
when we seei++
or++i
- suggest borrowing when trying to coerce unsized type into
dyn Trait
- suggest wrapping patterns in enum variants
- suggest wrapping single-expr blocks in square brackets
- codegen_gcc: add intrinsic translation for x86 arch
- codegen_gcc: add missing vendor intrinsics
- codegen_gcc: add support for target builtins
- codegen_gcc: feature/packed struct
- codegen_gcc: feature/simd
- stabilize native library modifier syntax and the
whole-archive
modifier specifically - stabilize
windows_process_extensions_raw_arg
- stabilize
Termination
andExitCode
- stabilize feature
vec_retain_mut
onVec
andVecDeque
- stabilize
thread::is_finished
- stabilize
total_cmp
- add
SyncUnsafeCell
- strict Provenance MVP
- implement provenance preserving methods on
NonNull
- async: give predictable name to binding generated from .await expressions
- portable-simd: move comparisons to traits
- rustdoc: fix invalid DOM generation
- rustdoc: fix multiline attributes handling in doctests
- rustdoc: fix rustdoc attribute display
- rustdoc: only show associated consts from inherent impls in sidebar
- rustfmt: preserve semicolon after macro call inside foreign mod
- rustfmt: fix struct field formatting with doc comments present
- clippy: add
crate_in_macro_def
lint - clippy: do not fire
panic
in a constant environment - clippy: don't lint
cast_ptr_alignment
when used for unaligned reads and writes - clippy: don't warn int-to-char transmutes in const contexts
- clippy: fix ICE for
iter_overeager_cloned
- clippy: handle relative paths in module_files lints
- clippy: provide suggestion context in map_unit_fn
- clippy: rework
undocumented_unsafe_blocks
- clippy: add
empty_structs_with_brackets
- clippy: single_element_loop: handle arrays for Edition 2021
- cargo-bisect: add support for git tags in
--start
and--end
- rustc-perf: use a summary table for PR comments
Rust Compiler Performance Triage
A somewhat quiet week with only a few improvements and regressions, but with improvements ever so slightly edging out regressions. The biggest regression was in a rollup which makes investigation difficult though it looks like its in trait resolution which impacts crates that do a lot of that such as diesel. The biggest improvement comes from work done by the performance team (more specifically @nnethercote) to improve macro_rules
parsing which can lead to sizeable performance gains for crates using the "token munching" pattern in macro_rules
.
Triage done by @rylev. Revision range: 3e75146..949b98c
2 Regressions, 2 Improvements, 1 Mixed; 2 of them in rollups 37 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:
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] Allow using for<'a> syntax when declaring closures
Tracking Issues & PRs
- [disposition: merge] [let_chains] Forbid let inside parentheses
New and Updated RFCs
Upcoming Events
Rusty Events between 2022-04-06 - 2022-05-04 🦀
Virtual
- 2022-04-06 | Egg Harbor City, NJ, US | Neighborhood Math Club
- 2022-04-06 | Indianapolis, IN, US | Indy Rust
- 2022-04-06 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-04-07 | Nürnberg, DE | Rust Nuremberg
- 2022-04-11 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-04-11 | Seattle, WA, US | Seattle Rust Meetup
- 2022-04-12 | Berlin, DE | OpenTechSchool Berlin
- 2022-04-12 | Dallas, TX, US | Dallas Rust
- 2022-04-12 | Rostock, DE | Altow Academy
- 2022-04-12 | Saarbrücken, DE | Rust-Saar
- 2022-04-13 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-04-13 | Egg Harbor City, NJ, US | Neighborhood Math Club
- 2022-04-13 | Munich, DE | Rust Munich
- 2022-04-14 | Stuttgart, DE | Rust Community Stuttgart
- 2022-04-18 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-04-19 | Washington, DC, US | Rust DC
- 2022-04-20 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-04-20 | San Diego, CA, US | San Diego Rust
- 2022-04-20 | Vancouver, BC, CA | Vancouver Rust
- 2022-04-21 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-04-23 | Various - EMEA | Rustfest
- 2022-04-26 | Berlin, DE | OpenTechSchool Berlin
- 2022-04-27 | Stuttgart, DE | Rust Community Stuttgart
- 2022-05-03 | Buffalo, NY, US | Buffalo Rust Meetup
Europe
- 2022-04-06 | Amsterdam, NL | Rust Developers Amsterdam Group, Part of Rust Amsterdam Network | Alt link
- 2022-04-06 | Bristol, UK | Rust Bristol
- 2022-04-12 | Berlin, DE | Rust Berlin
- 2022-04-13 | Munich, DE | Rust Munich
- 2022-04-13 | Paris, FR | Stockly
- 2022-04-14 | Cambridge, UK | Cambridge Rust Meetup
- 2022-04-19 | Bristol, UK | Rust Bristol
North America
- 2022-04-13 | Atlanta, GA, US | Rust ATL
- 2022-04-14 | Columbus, OH, US | Columbus Rust Society
- 2022-04-19 | San Francisco, CA, US | San Francisco Rust Study Group
- 2022-04-27 | Boston, MA, US | Boston Rust Meetup
Oceania
- 2022-04-21 | Melbourne, AUS | 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
KidsLoop
Amazon
NXLog
Timescale
Kollider
Stockly
- Back-end developer - TechOps (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer - Engine (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer - Freelance (Rust, gRPC, PostgreSQL) (Paris, FR)
Kraken
- Site Reliability Engineer - Rust - Core Backend (Remote)
- Rust Engineer, Desktop GUI - Cryptowatch (Remote)
- Engineering Manager - Rust - Core Backend (Remote)
Tempus Ex
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
I've seen similar sentiments echoed before, elsewhere. The point it's making is the same one that's argued whenever people say you should learn LISP because it'll make you a better programmer.
There's no such thing as a perfectly intuitive programming language because algorithmic thinking isn't something that comes to us intuitively. That's why the first language is always the hardest.
It's helpful and mind-expanding to learn new paradigms and force yourself out of old cognitive ruts. Thus, from an "improving your ability to solve problems and function as a programmer" perspective, what makes Rust difficult is valuable because it's forcing you to learn to think about problems in new ways.
That's the distinction between necessary complexity and complexity due to ill-considered design. (Similar to how, in video games, there's a difference between genuine difficulty and difficulty caused by something like a crappy control scheme.)
– Stephan Sokolow on rust-users (in our quotes thread!)
Thanks to Christopher Durham 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.
Email list hosting is sponsored by The Rust Foundation