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
Project/Tooling Updates
- rust-analyzer changelog #124
- IntelliJ Rust Changelog #168
- Ogma v0.3 release - now with type inference!
- Slint (GUI crate) weekly update
- Introducing FoundationDB Client API for Tokio
- Introducing PCB-rs : Making it easier to write hardware
- Fornjot (Code-CAD in Rust) - Weekly Dev Log - 2022-W14
- Fazi - a drop-in replacement for libfuzzer
- This Month in Rust OSDev (March 2022) | Rust OSDev
- This week in Fluvio #28: the programmable streaming platform
- This week in Databend #36: A Modern Cloud Data Warehouse for Everyone
- This week in Databend #37: A Modern Cloud Data Warehouse for Everyone
Newsletters
Observations/Thoughts
- Defaults Affect Inference in Rust: Expressions Instead Of Types
- Rust in Action Book Review
- What I learned from making a DNS client in Rust
- dyn* doesn't need to be special
- How to speed up the Rust compiler in April 2022
- Is life too short to fight Rust's borrow checker?
- Learning Rust You Need a Cognitive Frame
- [DE] Programmiersprache: Rust-Team blickt zwei Jahre nach vorn auf Rust 2024
- [DE] Programmiersprache Rust 1.60 zeigt Codeabdeckung und sieht Zeitspannen positiv
Rust Walkthroughs
- Implied bounds and perfect derive
- Postfix Spawn
- Continuous Looper
- Chumsky: A Tutorial
- Pointers Are Complicated III, or: Pointer-integer casts exposed
- rustdoc: Recent UI and UX changes in generated documentation
- Building a crawler in Rust: Associated Types
- [video] Perfect Reflections - 034 - The Ray Tracer Challenge
- [video] Let's Demystify the Borrow Checker! - Rust 101 Lecture 2
- [video] Using Futures to wrap an unsafe USB API to play audio directly - Denver Rust Meetup
Miscellaneous
Crate of the Week
This week's crate is hifitime, a high fidelity time management library.
Thanks to Christopher Rabotin 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.
- macro_railroad - SynParsing(Error("unrecognized fragment specifier"))
- RustConf 2022 CFP is Open!
- Rust Foundation Community Grants Program 2022 is accepting applications
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
373 pull requests were merged in the last week
- promote
x86_64-unknown-none
target to Tier 2 and distribute build artifacts - track individual proc-macro expansions in the self-profiler
- only suggest removing semicolon when expression is compatible with
impl Trait
- stop flagging unexpected inner attributes as outer ones in certain diagnostics
- strict provenance lints
- suggest adding a local for vector to fix borrowck errors
- suggest derivable trait on E0277 error
- suggest replacing
typeof(...)
with an actual type - diagnostics: give a special note for unsafe fn /
Fn
/FnOnce
/FnMut
- diagnostics: translation infrastructure
- diagnostics: use correct span for const generics
assert_uninit_valid
: ensure we detect at least arrays of uninhabited types- report opaque type mismatches directly during borrowck of the function instead of within the
type_of
query - call
compute_locs
once per rule - shrink
Nonterminal
- cached stable hash cleanups
- remove explicit delimiter token trees from
Delimited
- add new
ThinBox
type for 1 stack pointer wide heap allocated trait objects - enhance
ConstGoto
mir-opt by moving upStorageDead
statements - miri: add support for
FUTEX_
{WAIT
,WAKE
}_BITSET
- miri: for variadic functions, accept arbitrary trailing arguments
- add
<[[T; N]]>::flatten
{_mut
} - fix unsound
File
methods - replace Linux
Mutex
andCondvar
with futex based ones - stabilize
Stdin::lines
- use bitwise XOR in
to_ascii_uppercase
- fix:
Vec
leak when capacity is 0 - portable-SIMD: use SIMD equality for
PartialEq
on SIMD vectors - cargo: part 2 of RFC2906 - allow inheriting from a different
Cargo.toml
- cargo: part 3 of RFC2906 - Add support for inheriting
license-path
, anddepednency.path
- cargo: part 4 of RFC2906 - Add support for inheriting
readme
- rustdoc: early doc link resolution fixes and refactorings
- rustdoc: fix empty doc comment with backline ICE
- rustdoc: reduce allocations in a
html::markdown
function - clippy: add
err_expect
lint - clippy: add a lint to detect cast to unsigned for
abs()
and suggestunsigned_abs()
- clippy: add lints
drop_non_drop
andforget_non_drop
- clippy: new lint
is_digit_ascii_radix
- clippy: don't lint
iter_with_drain
on references - clippy: don't lint various match lints when expanded by a proc-macro
- clippy: fix
as_deref_mut
false positives inneedless_option_as_deref
- clippy: fix
same_functions_in_if_condition
false positive - clippy: fix
unsound_collection_transmute
- clippy: fix subtraction overflow in
cast_possible_truncation
- clippy: fix
unnecessary_cast
suggestion for type aliasses - clippy: remove overlap between
manual_split_once
andneedless_splitn
- clippy: suggest
from_utf8_unchecked
in const contexts - clippy:
indexing_slicing
should not fire if a valid array index comes from a constant function that is evaluated at compile-time - clippy:
unnecessary_owned_empty_strings
- clippy: fix false positive in
needless_match
- clippy: ignore
&x | &y
inunnested_or_patterns
Rust Compiler Performance Triage
A week with a large amount of changes in rollups, which makes performance triage difficult. The performance team and the infra team are working on finding ways to automate marking PRs as likely a poor choice for rolling up. Otherwise, the week overall saw a ~1% improvement in incremental check builds, with smaller improvements to incremental debug and release builds. A number of benchmarks have been updated in the last few weeks, which has meant a decrease in the automated noise assessment's algorithm performance, but that should settle out to steady state behavior on its own in the next few days.
Triage done by @simulacrum. Revision range: 949b98ca..4e1927d
5 Regressions, 4 Improvements, 7 Mixed; 7 of them in rollups 50 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:
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] Check if call return type is visibly uninhabited when building MIR
New and Updated RFCs
- No New or Updated RFCs were created this week.
Upcoming Events
Rusty Events between 2022-04-13 - 2022-05-11 🦀
Virtual
- 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-26 | Dallas, TX, US | Dallas Rust
- 2022-04-27 | Stuttgart, DE | Rust Community Stuttgart
- 2022-05-03 | Beijing, CN | WebAssembly and Rust Meetup (Rustlang)
- 2022-05-03 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-05-04 | Indianapolis, IN, US | Indy Rust
- 2022-05-05 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-05-10 | Berlin, DE | OpenTechSchool Berlin
- 2022-05-10 | Dallas, TX, US | Dallas Rust
- 2022-05-10 | Rostock, DE | Altow Academy
- 2022-05-10 | Seattle, WA, US | Seattle Rust Meetup
- 2022-05-11 | Boulder, CO, US | Boulder Elixir and Rust
Europe
- 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
- 2022-05-11 | Atlanta, GA, US | Rust ATL
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
Element
Amazon
dcSpark
Stockly
- Back-end developer (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer - Engine (Rust, gRPC, PostgreSQL) (Paris, FR)
Grover
- Senior/Mid Software Engineer - Rust & Python (EU || Remote)
- Machine Learning Engineer - Rust & Python (EU || Remote)
- Data Engineer - Rust & Python (EU || Remote)
Kollider
- Senior Frontend Engineer - Rust (Remote)
- Junior Backend Engineer - Rust (Remote)
- Senior Full Stack Developer - Rust (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Relying on the programmer to always read, comprehend, and remember the documentation – and then do everything right, every time – is how we get bugs.
Thanks to Brian Kung 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