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
- Rust Analyzer Changelog #107
- Cranelift Progress Report: A Look Back at 2021
- Rust for Linux
- Announcing rsadsb v0.4.0: View Airplanes in the sky with Rust
- SixtyFPS (GUI crate): Changelog for 12th of December 2021
- sysinfo: version 0.22 and FreeBSD support
- Announcing the Grafana Plugin SDK for Rust
- Announcing Enzyme for Rust
- This week in Databend #20: an elastic and reliable cloud warehouse
- This week in Fluvio #16: the programmable streaming platform
- git-cliff 0.5.0 (changelog generator)
Observations/Thoughts
- Rust as a platform for IoT
- https://madsravn.dk/posts/using-liquid-rust-with-serde
- Rust Error Handling
- How not to learn Rust
- [audio] Refactoring to Rust with Lily Mara
- [video] Talking about the Rust Programming Language with Luca Palmieri
Rust Walkthroughs
- A brutally effective hash function in Rust
- Less Painful Linear Types
- A Rust Api pattern (Actix)
- Authoring a SIMD enhanced Wasm library with Rust
- Getting better insights into your Rust applications
- Validating JSON input in Rust web services
- [video] Building a networked Web and Native app with Rust
- [series] [video] rg3d - live game development #4
Miscellaneous
- The DevX Initiative Sponsorship Program: Goals and Principles
- Introducing the new Relay compiler
- [DE] Linux-Kernel: Rust-Entwicklung schreitet mit neuer Edition voran
Crate of the Week
This week's crate is efg, a proc macro to allow boolean expression like syntax for #[cfg]
s.
Thanks to farnbams for the 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.
Ockam
- Change no_main feature on ockam_macros to an argument
- Reduce the features that the ockam_macros crate requires from syn
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
315 pull requests were merged in the last week
- asm: allow using r9 (ARM) and x18 (AArch64) if they are not reserved by the current target
- suggest using a temporary variable to fix borrowck errors
- tweak "call this function" suggestion to have smaller span
- tweak assoc type obligation spans
- better span for unexpected normalization failure in CTFE engine
- give more help in the unaligned_references lint
- suggest casting between
i
/u32
andchar
- add a suggestion if
macro_rules
is misspelled - avoid cloning refcounted types during folding
- deduplicate projection sub-obligations
- do not ICE when suggesting elided lifetimes on non-existent spans
- do not add
;
to expected tokens list when it's wrong - do not attempt to suggest help for overly malformed struct/function call
- improve 'cannot contain emoji' error
- add
spin_loop
hint for RISC-V architecture - override
Iterator::advance
(_back
)_by
forarray::IntoIter
- replace dominators algorithm with simple Lengauer-Tarjan
- add
<*{const|mut} T>::{to|from}_bits
- add
array::IntoIter::
{empty
,from_raw_parts
} - add
rsplit_array
variants to slices and arrays - make
Option::cloned
const
- make
(*mut T)::write_bytes
const
- make
Borrow
andBorrowMut
implsconst
- make
Unique
s methodsconst
- make
intrinsics::write_bytes
const
- implement
TryFrom<&'_ mut [T]>
for[T; N]
- implement
core::future::join!
- implement concat_bytes!
- provide the
ReadBuf
abstraction - stabilise
feature(const_generics_defaults)
- stabilize
ControlFlow::
{is_break
,is_continue
} - stabilize
const_cstr_unchecked
- cargo: improve I/O error message for fingerprint of build script
- rustdoc: show type layout for type aliases
- clippy: add new lint to warn when
#[must_use]
attribute should be used on a method - clippy: fix FP on
question_mark
if returned object is not local - clippy: fix
blocks_in_if_conditions
false positive - clippy: fix bad suggestion on
option_if_let_else
when there is complex subpat - clippy: ignore associated types in traits when considering type complexity
Rust Compiler Performance Triage
This week's report started with 6 regressions; after eliminating truly obvious noise, we are left with just 2 minor regressions. Of the cases that regressed, I think the only interesting one is keccak (regressed by 1.73% in PR #91549). But don't be too depressed: keccak was also improved up to 23% by PR #85013 (!); thanks to @simulacrum for that PR.
Triage done by @pnkfelix. Revision range: e2116a..404c847
2 Regressions, 5 Improvements, 3 Mixed; 1 of them in rollups 48 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
- [disposition: merge] Amend RFC 2996 to replace Stream with AsyncIterator
- [disposition: merge] Thread local Cell methods.
Tracking Issues & PRs
- [disposition: merge] Make rustdoc --passes and rustdoc --no-defaults have no effect
- [disposition: merge] make Instant::{duration_since, elapsed, sub} saturating and remove workarounds
- [disposition: close] Tracking issue for RFC 2115: In-band lifetime bindings
New RFCs
- No new RFCs were published this week.
Upcoming Events
Rusty Events between 12/15/2021 - 1/15/2022 🦀
Online
- December 15, 2021 | Cardiff, UK | Rust Book Study Session - Error Handling & Generic Types, Traits, and Lifetimes | Rust and C++ Cardiff
- December 16, 2021 | Linz, AT | Rust Meetup Linz - 17th Edition | Rust Linz
- December 17, 2021 | Various cities, IR | The Third Rust Iran online meetup | Rust Iran Meetup
- December 18, 2021 | Vancouver, BC, CA | Your Rust Web Development Toolset | Vancouver Rust
- December 21, 2021 | Los Gatos, CA, US | Book #24 - Rust for Rustaceans - Chapter 1 (session 3) | Los Gatos Reading Group | Alternative Link (South Padre Island, TX Reading Group)
- December 21, 2021 | Washington, DC, US | Mid-month Rustful | Rust DC
- December 23, 2021 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
- December 28, 2021 | Dallas, TX, US | Dallas Rust - Last Tuesday | Dallas Rust
- January 5, 2022 | Indianapolis, IN, US | Indy.rs - with Social Distancing | Indy Rust
- January 6, 2022 | Nürnberg, DE | Rust Nürnberg online #8| Rust Nuremberg
- January 8, 2022 | Various cities | Rust GameDev Monthly Meetup | Rust GameDev
- January 11, 2022 | Seattle, WA, US | Monthly meetup | Seattle Rust Meetup
- January 12, 2022 | Boulder, CO, US | Monthly Meetup | Boulder Elixir and Rust
- January 12, 2022 | Los Angeles, CA, US | Live Coding Session - Mob Programming a Rust Code Kata [Virtual] Jan. 2022 | Rust Los Angeles
- January 12, 2022 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
North America
- December 16, 2021 | Austin, TX, US | Rust Lunch | Rust ATX
- January 12, 2022 | Atlanta, GA, US | Grab a beer with fellow Rustaceans | Rust Atlanta
- January 13, 2022 | Columbus, OH, US | Monthly Meeting | Columbus Rust Society
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
Kraken
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
- Senior Rust Engineer - Banking (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
This is safer than you may think, because those who need async tend to know it themselves and don't ask "should I use async" question. In other words, asking itself is a signal that answer is no. MITM proxy case was a rare exception.
Thanks to Zeroexcuses 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