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
- Announcing Rust 1.58.1
- Security advisory for the standard library (CVE-2022-21658)
- Rust Compiler January 2022 Steering Cycle
Project/Tooling Updates
- Rust Analyzer Changelog #113
- SixtyFPS (GUI crate): Changelog for 23th of January 2022
- Settings sync browser addon for rustdoc
- Dotenv-linter v3.2.0: Overview
- youki 0.0.2 release
- This week in Databend #26: an elastic and reliable cloud warehouse
Newsletters
Research
Observations/Thoughts
- Being Fair about Memory Safety and Performance
- Why Static Languages Suffer From Complexity
- Async destruction on stable rust
- async-await: Cooperative vs Preemptive scheduling
- Detect unsigned integer underflow
- Non-Lazy Futures Considered Harmful
- Part 1: The life of an optimization barrier
- On Rust in Webdev
- Unsoundness in owning_ref
- Type-Driven Development
- Rust Programming, What to Look Forward to in 2022
Rust Walkthroughs
- Clean and Scalable Architecture for Rust Web Applications
- Building fast Wikipedia bots in Rust
- Futures and Tasks: A tale of concurrency and parallelism
- Lowering async await in rust
- Publishing to crates.io
- Hello, Microcontroller! - Demystify microcontrollers by programming one in ~100 lines of dependency-free Rust
- Rain's Rust CLI recommendations
- Taking Rust for a Ride to Azeroth: What writing an AH Scanner in Rust taught me
- On self-modifying executables in Rust
- Using tree data structures to implement terminal split panes - more fun than it sounds
- Durability and Redo Logging
- [video] Messing With The Recipe
- [audio] Gitoxide with Sebastian Thiel
Miscellaneous
Crate of the Week
This week's crate is html5gum, a WHATWG HTML spec-compliant HTML5 tokenizer.
Thanks to Markus Unterwaditzer 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
381 pull requests were merged in the last week
- LLVM on AArch64/GlobalISel: fix incorrect handling of fp truncating stores
- show a more informative panic message when
DefPathHash
does not exist - only suggest adding
!
to expressions that can be macro invocation - point at correct argument when async fn output type lifetime disagrees with signature
- change lint message to be stronger for
&T
→&mut T
transmute - improve string concatenation suggestion
- formally implement let chains
- implement
#[rustc_must_implement_one_of]
attribute - allow eq constraints on associated constants
- check
const Drop
impls considering~const
Bounds - add
~const
bound test for negative impls - fix ICEs related to
Deref<Target=[T; N]>
on newtypes - disable drop range tracking in generators
- directly use ConstValue for single literals in blocks
- add preliminary support for inline assembly for msp430
- let qpath contain NtTy:
<$:ty as $:ty>::…
- make
Decodable
andDecoder
infallible - remove a
Span
fromhir::ExprKind::MethodCall
- emit simpler code from
format_args
- fix CVE-2022-21658 (symbolic link timing attack in
std::fs::remove_dir_all
) - implement RFC 3151: Scoped threads
- improve capacity estimation in
Vec::from_iter
- little improves in
CString::new
when creating from slice - add
MaybeUninit::
(slice_
)as_bytes
(_mut
) - add
Option::is_some_with
andResult::is_
{ok
,err
}_with
- add
log2
andlog10
toNonZeroU*
- std: implement
try_reserve
andtry_reserve_exact
onPathBuf
impl Not for !
(did you guess that "not never" is still "never"?)- stabilize
arc_new_cyclic
- stabilize
vec_spare_capacity
- stabilize
-Z print-link-args
as--print link-args
- cargo: error when setting crate type of both dylib and cdylib in library
- clippy: add
msrv
config formap_clone
- clippy: check usages in
ptr_arg
- clippy: don't suggest an empty variant name in
enum_variant_names
- clippy: fix
needless_borrow
causing mutable borrows to be moved - clippy:
needless_lifetimes
: ignore lifetimes in explicit self types - clippy:
trait_duplication_in_bounds
checks path segments for trait items - clippy: fix
needless_question_mark
not considering async fn - clippy: fix
op_ref
false positive
Rust Compiler Performance Triage
An awesome week. There was some bits of noise from PR #91032 that landed and then had to be backed out (and may soon land again), and we continue to wrestle with how to classify which things to include in rollup PR's. But overall there were some very real wins to the compiler's performance, and it is definitely reflected in the total bootstrap time graph. Great job!
Triage done by @pnkfelix. Revision range: 7bc7be..c54dfe
4 Regressions, 5 Improvements, 4 Mixed; 3 of them in rollups
29 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 FCP this week.
Tracking Issues & PRs
- [disposition: merge] unreachable!("{}") works on Rust 2021
- [disposition: merge] Tracking Issue for Stdin::lines forwarder method
- [disposition: merge] impl Display for io::ErrorKind
- [disposition: merge] Tracking Issue for feature(pin_static_ref): Pin::{static_ref,static_mut}
- [disposition: merge] Tracking issue for #[cfg(target_has_atomic = ...)]
- [disposition: merge] Stabilize -Z instrument-coverage as -C instrument-coverage
New and Updated RFCs
- [new] Add
ignore_if
RFC - [update] Add vendor-specific suffixes to v0 mangling RFC 2603
- [update] Mark RFC 1201 (naked functions) superseded by RFC 2972 (constrained naked functions)
Upcoming Events
Rusty Events between 1/26/2022 - 2/23/2022 🦀
Online
- January 26, 2021 | Vienna, AT | The Rustic Mob | Mob-Programming on Open Source Software
- January 27, 2022 | Charlottesville, VA, US | Minimal Area Bananagrams: a Tale of Needless Optimization | Charlottesville Rust Meetup
- January 27, 2021 | Linz, AT | Rust Meetup Linz - 18th Edition | Rust Linz
- January 27, 2022 | Nürnberg, DE | Rust Nürnberg online #9| Rust Nuremberg
- January 27, 2022 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
- January 29, 2021 | London, UK | Rust (Remote) Hack & Learn | Rust London User Group
- February 1, 2021 | Berlin, DE | Rust Hack and Learn | OpenTechSchool Berlin
- February 1, 2022 | Buffalo, NY, US | First Tuesdays: Buffalo Rust User Group | Buffalo Rust Meetup
- February 1, 2022 | Los Gatos, CA, US | Book #24 - Rust for Rustaceans - Chapter 4 - Error Handling | Los Gatos Reading Group
- February 3, 2022 | Cardiff, UK | Rust Book Study Session - Smart Pointers | Rust and C++ Cardiff
- February 8, 2022 | Seattle, WA, US | Monthly meetup | Seattle Rust Meetup
- February 9, 2022 | Los Angeles, CA, US | Raphael Tessmer & Celeste, finding craters on a rusty planet (Virtual) | Rust Los Angeles
- February 9, 2022 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
- February 15, 2022 | Washington, DC, US| Mid-month Rustful | Rust DC
- February 16, 2022 | Vancouver, BC, CA | Rust Study/Hack/Hang-out Night | Vancouver Rust
- February 17, 2022 | München, DE | Rust - beyond "Hello World"| Agile Softwareentwicklung München
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
Aembit
Kollider
BrightMarbles
Tempus Ex
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Rust : We have a race condition bug in our standard filesystem library !
C++ : You guys have a concurrency safe standard filesystem library ?
C : You guys have a standard filesystem library ?
– redditmodsareshits on /r/cpp
Thanks to UtherII 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