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
- Rust Analyzer Changelog #105
- SixtyFPS (GUI crate): Changelog for 28th of November 2021 – 0.1.15 Release
- This week in Databend #18: an elastic and reliable cloud warehouse
- Wasmer 2.1
- Wyrcan ~ The Container Bootloader
- This week in Fluvio #15: the programmable streaming platform
Observations/Thoughts
- Do we Really Need Undefined Behavior?
- Notes On Module System
- A prioritised micro-batch scheduler in rust
- Go footguns: Go Defer and Rust Drop
- LLVM internals, part 4: attributes and attribute groups
- Implementing Raft for Browsers with Rust and WebRTC
- Hubris and Humility
- [ZH] Zero-Cost Abstractions in Rust
- [audio] Game Development with Herbert Wolverson
- [video] Rust Linz, November 2021 - Advent of Code by Rainer Stropek with Fred Morcos
- [video] Rust Linz, November 2021 - Serde Shenanigans by Armin Ronacher
- [video] Rust Linz, November 2021 - WebAssembly beyond the browser by Thorsten Hans
- [video] Rust 2021 Edition Explained
- [video] Mats Kindahl: A C++ programmer's view on Rust
Rust Walkthroughs
- Black Hat Week (Black Hat Rust is out 🍾)
- Using WebAssembly (created in Rust) for Fast React Components
- Speed up Rust Builds with Cachepot
- Rena’s Memory Model
- How to Build a Note Taking Command Line Application With Rust: Part 1
- Rust Project: Ping Pong Game
- Learn Rust Programming Course – Interactive Rust Language Tutorial on Repl.it
- Position Independent Shellcodes in Rust (PIC)
- Run Your Rust Games in a Browser
- Git Internals part 2: packfiles
- Building a simple on-chain point of sale with Solana, Anchor and React
- Checking Unused Dependencies in a Rust Project with Github Actions
- [video] rg3d - live coding session #3
- [video] The Ray Tracer Challenge - 022 - Planes
- [PL] [video] Rust na raz #2: Ugliest workaround for unsafe
Miscellaneous
- Can Rust save the planet? Why, and why not
- 4x smaller, 50x faster
- [PT] Esta-Semana-Em-Rust #418
- [video] RCIG Sync-up call #6
Crate of the Week
This week's crate is poem-openapi, a framework to implement OpenAPI services.
llogiq is very pleased with his 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
- Move the ockam_vault_core create into ockam_core
- Move the ockam_key_exchange_core create into ockam_core
- Delete the ockam_node_no_std crate
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
244 pull requests were merged in the last week
- add codegen option for using LLVM stack smash protection
- do not use atomic reads on platforms without atomic support in LLVM
- diagnostic tweaks
- chalk: introduce
Folder::Error
- miri: more portable SIMD: rem, shl, shr
- fix ICE due to out-of-bounds statement index when reporting borrowck error
- fix ICE when lowering
trait A where for<'a> Self: 'a
- faster
Layout::array
- make
TypeFolder::fold_*
returnResult
- partially stabilize
duration_consts_2
- stabilize
nonzero_is_power_of_two
- stabilize some
MaybeUninit
behavior as const - add fast path to
is_descendant_of
- futures: remove dependency on proc-macro-hack
- cargo: improve unused patch message when source URLs mismatched
- clippy: add
needless_late_init
lint - clippy: add more descriptive help info for
needless_question_mark
- clippy: fix false positive on
if_then_some_else_none
with early return - clippy: improve
strlen_on_c_string
- clippy: extend
non_ascii_literal
to cover chars - clippy: apply iter_cloned_collect to collect() using copied()
- rustdoc: avoid documenting top-level private imports
- rustfmt: fix: do not wrap reference-style doc links
- rustfmt: maintain more AST info when formatting a RHS
Rust Compiler Performance Triage
Overall, many changes this week, but overall an improvement on multiple benchmarks over the week from a number of pull requests dedicated to optimizations of certain patterns. We are still seeing a large number of spurious changes due to rustc-perf#1105, which has yet to be addressed.
Triage done by @simulacrum. Revision range: 22c2d9d..1c028783
4 Regressions, 4 Improvements, 9 Mixed; 5 of them in rollups 41 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] rustdoc: accept --out-dir and soft-deprecate --output
- [disposition: merge] Tracking Issue for #![feature(available_parallelism)]
New RFCs
Upcoming Events
Rusty Events between 12/01-12/15 🦀
Online
- December 3, 2021 | New York City, NY, US | Getting started in aerospace with Rust 🦀 | NewSpace NYC.
- December 7, 2021 | Buffalo, NY, US | First Tuesdays | Buffalo Rust Meetup
- December 8, 2021 | Los Gatos, CA, US | Book #24 - Rust for Rustaceans - Chapter 1 | Los Gatos Reading Group
- December 8, 2021 | Los Angeles, CA, US | Rust Computer Vision Project with Geordon Worley | Rust Los Angeles
- December 8, 2021 | Stuttgart, DE | Rust-Meetup | Rust Community Stuttgart
- December 10, 2021 | Chicago, IL, US | 8LU Keynote by Eric Smith - Write Your Game in Rust! | 8th Light University
- December 14, 2021 | Seattle, WA, US | Monthly Meetup | Seattle Rust Meetup
North America
Europe
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
Tangram
Flaps
CoBloX
Globelise
Bionaut Labs
- Embedded Software Engineer (Senior) (Los Angeles, CA, US)
- Embedded Software Engineer (Junior) (Los Angeles, CA)
Massa Labs
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
The design of the safe/unsafe split means that there is an asymmetric trust relationship between Safe and Unsafe Rust. Safe Rust inherently has to trust that any Unsafe Rust it touches has been written correctly. On the other hand, Unsafe Rust cannot trust Safe Rust without care.
As an example, Rust has the
PartialOrd
andOrd
traits to differentiate between types which can "just" be compared, and those that provide a "total" ordering (which basically means that comparison behaves reasonably).
BTreeMap
doesn't really make sense for partially-ordered types, and so it requires that its keys implementOrd
. However,BTreeMap
has Unsafe Rust code inside of its implementation. Because it would be unacceptable for a sloppyOrd
implementation (which is Safe to write) to cause Undefined Behavior, the Unsafe code in BTreeMap must be written to be robust againstOrd
implementations which aren't actually total — even though that's the whole point of requiringOrd
.
– Gankra citing the Rustonomicon on github
Thanks to robin 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, marriannegoldin.
Email list hosting is sponsored by The Rust Foundation