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
Project/Tooling Updates
- SixtyFPS (GUI crate) weekly update for 27th of September 2021
- This week in Fluvio #6: the programmable streaming platform
- This week in Databend #9: an elastic and reliable cloud warehouse
- IntelliJ Rust Changelog #156
- Rust Analyzer #96
Observations/Thoughts
- Common Newbie Mistakes and Bad Practices in Rust: Bad Habits
- Why Rust in medical imaging? A reflection on modern technologies for next generation systems
- Why we built a custom Rust library for Capture
- [audio] Rust for Rustaceans by Jon Gjengset
- [video] Rust Talks at the Linux Plumbers Conference 2021
Rust Walkthroughs
- Building a static site generator in 100 lines of Rust
- STM32F3’s Magnetometer | Use-cases & Reading Extraction (Part-1)
- Reproducible cross-compilation for Rust (with Docker)
- Rust Brain Teasers
- Writing embedded firmware using Rust
- Using Rust Cloudflare Workers: Serverless hCaptcha
- Deploy an ultra-fast blog in minutes with Eleventy and AssemblyLift (WebAssembly + Lambda + API Gateway + Rust)
- [PT] Rust - Ownership ?
- [video] Hacking on rustc - Negative literals in indexing expressions
- [video] Getting started with Rust 🦀 2021: 6. Library API design overhaul, async and more
Miscellaneous
- GitHub Advisory Database now supports Rust
- Rust for the Polyglot Programmer - introducing a new guide to the language
- [DE] Modernes Rust im Jahr 2021 @ Gesellschaft für Informatik
Crate of the Week
This week's crate is miette, a library for error handling that is beautiful both in code and output.
Thanks to Kat Marchán 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
265 pull requests were merged in the last week
- suggest both of immutable and mutable trait implementations
- give better error for
macro_rules! name!
- validate builtin attributes for macro args
- implement
#[must_not_suspend]
- support
#[track_caller]
on closures and generators - make
#[track_caller]
actually do stuff inSteal::borrow
- revise never type fallback algorithm
- don't use projection cache or candidate cache in intercrate mode
- don't normalize opaque types with escaping late-bound regions
- disable visible path calculation for
PrettyPrinter
inOk
path of compiler - enable new pass manager with LLVM 13
- simplify
scoped_thread
- stabilize
Iterator::map_while
- use ZST for
fmt
unsafety - rustfmt: trailing comma on match block goes missing when guard is on its own line
- rustfmt: simplify and speed up search for local path based deps with
cargo fmt --all
- clippy: demote
float_cmp
to pedantic - clippy: new lint
if_then_panic
- clippy: stop
excessive_precision
from suggesting a float truncation that is not shorter - clippy: don't lint
suspicious_else_formatting
inside proc-macros
Rust Compiler Performance Triage
The largest story for the week are the massive improvements that come from enabling the new pass manager in LLVM which leads to consistent 5% to 30% improvements across almost all test cases. The regressions were mostly minor with clear paths for addressing the ones that were not made with some specific trade off in mind.
Triage done by @rylev. Revision range: 7743c9..83f147
4 Regressions, 4 Improvements, 3 Mixed; 0 of them in rollups
43 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 are currently in the final comment period.
Tracking Issues & PRs
- [disposition: merge] Tracking Issue for saturating_div
- [disposition: merge] Avoid allocations and copying in
Vec::leak
- [disposition: merge] Stabilize RFC 2345: Allow panicking in constants
- [disposition: merge] Perform type inference in range pattern
- [disposition: merge] Tracking issue for
proc_macro::is_available()
- [disposition: close] Tracking issue for
alloc::prelude
New RFCs
No new RFCs were proposed this week.
Upcoming Events
Online
- September 30, 2021, Berlin, DE - Rust Hack and Learn - Berline.rs
- October 2, 2021 - Rust Graphics meetup
- October 5, 2021, Buffalo, NY, US - Buffalo Rust User Group, First Tuesdays - Buffalo Rust Meetup
- October 7, 2021, Zürich, CH - Rust & GUI: egui - Rust Zürichsee
- October 9, 2021 - Rust Gamedev Discord - Rust Gamedev Monthly Meetup
- October 12, 2021, Seattle, WA, US - Monthly meetup - Seattle Rust Meetup
- October 13, 2021 - betterCode Rust
North America
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
Enso
Stockly
Timescale
ChainSafe
Kraken
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
- Senior Banking Engineer - Rust (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
This week we have two great quotes!
The signature of your function is your contract with not only the compiler, but also users of your function.
Do you want to know what was harder than learning lifetimes? Learning the same lessons through twenty years of making preventable mistakes.
– Zac Burns in his RustConf talk
Thanks to Daniel H-M and Erik Zivkovic for the suggestions!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.