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 #111
- rustc_codegen_gcc: Progress Report #7
- Bevy 0.6
- rg3d 0.24 Feature Highlights
- Lishwist (beta)
- Rust on Espressif chips - 10-01-2022
- This week in Fluvio #19: the programmable streaming platform
- The engine was renamed to Fyrox
Observations/Thoughts
- Dyn async traits, part 7: a design emerges?
- Rust in 2022
- Bringing include_dir Into the Modern Era
- Rust Async and the Terrible, Horrible, No Good, Very Bad Day
- Crate of the Week second chance list
- How we built a VS Code extension with Rust, WebAssembly, and TypeScript
- App and OS Virtualization in Rust using crosvm
- Rust 2030 Christmas list: Inout methods
- What does a Rustc Reading Club do?
- Why I Use a Debugger
- [audio] Yew with Julius Lungys
- [video] Flying High with Flutter #40
- [video] The Downside of Rust
Research
- Rast: A Language for Resource-Aware Session Types
- RISE & Shine: Language-Orientated Compiler Design
- SixtyFPS (GUI crate): Changelog for 9th of January 2022
- This week in Databend #24: an elastic and reliable cloud warehouse
Rust Walkthroughs
- Three Kinds of Polymorphism in Rust
- How Bevy uses Rust traits for labeling
- Parsing compressed files efficiently with Rust
- Rust Any Part 1: Extension Maps in Rust
- Rust Any Part 2: As-Any Hack
- How to Implement a Naive Bayes Classifier with Rust
- Adding parallelism to your Rust iterators with dpc-pariter
- Parsing Text with Nom
- Implementing a metronome with Rust and Flutter
- Making Games in Rust - Part 9 - Main Menu Screen
- Emulating the Sega Genesis - Part I
- How to install cargo-outdated in OSX without homebrew
- Async Rust From The Ground Up: Concurrency With Threads
- Secure and immutable development environments with Dev Containers
- [ZH] 2021 年 Rust 生态调研报告 | 星辰大海(上篇)
Miscellaneous
- Let's take a moment to thank Joshua Nelson for his work on rustdoc
- Could Rust be the Future of JavaScript Infrastructure?
- Rust Memory Layout Optimization (Enum)
Crate of the Week
This week's crate is rustix, a crate with safe bindings to POSIX-ish syscalls.
Thanks to Kornel 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
266 pull requests were merged in the last week
- allow
_
as the length of array types and repeat expressions (this implements the closed RFC PR #2545) - cg: split dwarf for crate dependencies
- suggest single quotes when char expected, str provided
- add a query for resolving an impl item from the trait item
- miri: exclude mutable references to !Unpin types from uniqueness guarantees
- perf: do not use LEB128 for encoding u16 and i16
- rustc_metadata: optimize and document module children decoding
- normalize generator-local types with unevaluated constants
- normalize struct tail type when checking Pointee trait
- constify
Box<T, A>
methods - do not hash leading zero bytes of i64 numbers in Sip128 hasher
- implement
TryFrom<char>
foru8
- implement const casts of raw pointers
- stabilize
#[feature(available_parallelism)]
- stabilize
result_cloned
andresult_copied
- modifications to
std::io::Stdin
on Windows so that there is no longer a 4-byte buffer minimum in read() - core::ops::unsize: improve docs for DispatchFromDyn
- hashbrown: don't hash the key when searching in an empty table
- cargo: support rustflags per profile
- cargo: be resilient to most IO error and filesystem loop while walking dirs
- rustdoc: introduce a resolver cache for sharing data between early doc link resolution and later passes
- rustdoc: resolve associated traits for non-generic primitive types
- docs.rs: add "y" shortcut for permalink
- clippy: better detect when a field can be moved from in
while_let_on_iterator
- clippy: consider auto-deref when linting
manual_swap
- clippy: fix
type_repetition_in_bounds
- clippy: cover trait for
trait_duplication_in_bounds
- clippy: fix
iter_not_returning_iterator
Rust Compiler Performance Triage
Improvements generally outweighed regressions with most regressions coming in the form of correctness fixes (where performance regressions are generally less of a concern). The biggest win was arguably a change to the Sip128 hasher implementation which seemed to have decent performance implications for many real world crates.
Triage done by @rylev. Revision range: 2b681ac..72e74d7
3 Regressions, 7 Improvements, 2 Mixed; 4 of them in rollups 28 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] doc: guarantee call order for sort_by_cached_key
New RFCs
- Rename {Option, Result}::expect to unwrap_or_panic
- Add RFC for providing ignore test message
- Allow using for<'a> syntax when declaring closures
Upcoming Events
Rusty Events between 1/12/2022 - 2/9/2022 🦀
Online
- January 12, 2022 | Boulder, CO, US | Monthly Meetup | Boulder Elixir and Rust
- January 12, 2022 | Frankfurt, DE | Rust for bare-metal embedded systems | Developing Embedded Systems in Rhein-Main
- 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
- January 13, 2022 | Charlottesville, VA, US | Higher kinded polymorphism | Charlottesville Rust Meetup
- January 13, 2022 | Minneapolis, MN, US | Safe Systems Programming in Rust: The Promise and the Challenge | Software Engineering Reading Group
- January 13, 2022 | San Diego, CA, US | San Diego Rust Rust January 2022 Tele-Meetup | San Diego Rust
- January 13, 2022 | Warsaw, PL | Rust Warsaw #4 | Rust Warsaw
- January 18, 2022 | Los Gatos, CA, US | Book #24 - Rust for Rustaceans - Chapter 2 (finishing) & Chapter 3 (beginning) | Los Gatos Reading Group
- January 18, 2022 | Washington, DC, US| Mid-month Rustful | Rust DC
- January 19, 2022 | Vancouver, BC, CA | Rust Study/Hack/Hang-out night | Vancouver Rust
- January 20, 2022 | Cardiff, UK | Rust Book Study Session - Functional Language Features & Cargo and Crates.io | Rust and C++ Cardiff
- January 25, 2022 | Dallas, TX, US | Last Tuesday Meetup | Dallas Rust
- January 27, 2022 | Nürnberg, DE | Rust Nürnberg online #9| Rust Nuremberg
- January 27, 2022 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
- February 1, 2022 | Buffalo, NY, US | First Tuesdays: Buffalo Rust User Group | Buffalo Rust Meetup
- February 9, 2022 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
North America
- 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
- January 18, 2022 | San Francisco, CA, US | Rust Hacking in Person | San Francisco Rust Study Group
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
Dreamsolution
LoanPASS
Kraken
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote GMT + or - 2 hours)
- Senior Rust Engineer - Banking (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Language stability is not just about semver compatibility. It's also about not burdening developers to have to make new decisions when looking at old code. [Language instability] creates churn and debate about things that previously didn't require it.
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