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.
Updates from Rust Community
- 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
- 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
- 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
- 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.
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.
- 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
- 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
- partially stabilize
- stabilize some
MaybeUninitbehavior as const
- add fast path to
- futures: remove dependency on proc-macro-hack
- cargo: improve unused patch message when source URLs mismatched
- clippy: add
- clippy: add more descriptive help info for
- clippy: fix false positive on
if_then_some_else_nonewith early return
- clippy: improve
- clippy: extend
non_ascii_literalto 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
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.
- No RFCs entered final comment period this week.
- [disposition: merge] rustdoc: accept --out-dir and soft-deprecate --output
- [disposition: merge] Tracking Issue for #![feature(available_parallelism)]
Rusty Events between 12/01-12/15 🦀
- 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
- Embedded Software Engineer (Senior) (Los Angeles, CA, US)
- Embedded Software Engineer (Junior) (Los Angeles, CA)
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
Ordtraits to differentiate between types which can "just" be compared, and those that provide a "total" ordering (which basically means that comparison behaves reasonably).
BTreeMapdoesn't really make sense for partially-ordered types, and so it requires that its keys implement
BTreeMaphas Unsafe Rust code inside of its implementation. Because it would be unacceptable for a sloppy
Ordimplementation (which is Safe to write) to cause Undefined Behavior, the Unsafe code in BTreeMap must be written to be robust against
Ordimplementations which aren't actually total — even though that's the whole point of requiring
Thanks to robin for the suggestion!
Email list hosting is sponsored by The Rust Foundation