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
- Announcing Relm4 v0.2
- SixtyFPS (GUI crate) weekly update for 10th of October 2021
- This week in Fluvio #8: the programmable streaming platform
- Knurling-rs changelog #32
- wgpu: Release of 0.11 with beta WebGL support
- This week in Databend #11: an elastic and reliable cloud warehouse
- FutureSDR: An Async Software Defined Radio Framework Implemented in Rust
- Rust Analyzer Changelog #98
- IntelliJ Rust Changelog #157
- Convis - Open Source Container Visibility
- Debugging Rust in JetBrains IDEs: state of affairs
Newsletters
Observations/Thoughts
- Awesome Rust projects for Hacktoberfest
- Rust async can truly be zero-cost
- Intelligent brute forcing
- Locks in asynchronous applications in Rust
- The nightly elephant in the room
- Rust and GCC, two different ways
- [video] Whoops! I Rewrote It in Rust
- [video] Rust Is Safe. But Is It Fast?
- [video] Rust, Wright's Law, and the Future of Low-Latency Systems
Rust Walkthroughs
- Rust Guide: Generics Demystified Part 1
- Multithreading in Rust
- Phantom Types in Rust 👻
- Programming PIC32 Microcontroller with Rust
- Testing with Spirit
- Hexagonal architecture in Rust #6 - CLI
- Incorporating JavaScript into a Rust app
- Rust Iterators
- Running Rust on AWS Lambda on ARM64
- Android Rust Introduction
- Lambda function HTTP authorization with Auth0 and AssemblyLift (WebAssembly + Lambda + API Gateway + Rust)
- Game of Life in Rust
- [series] Build Your Text Editor With Rust! Part 6
- [series] URL Shortener with Rust, Svelte, & AWS (6/): Deploying to AWS
- [series]Container Runtime in Rust - Part II
- [video] Getting started with Rust 🦀 2021: 7a. Building a GUI app in Rust [Part A]
- [video] Type-Driven API Design in Rust
- [video] Visualizing memory layout of Rust's data types
- [video] Crust of Rust: functions, closures, and their traits
- [video] LRG-01: The essence of Rust
Crate of the Week
This week's crate is flutter_rust_bridge, a memory-safe binding generator for Flutter/Dart ↔ Rust.
Thanks to fzyzcjy 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 - Make TryAsyncClone trait derivable. Add TryAsyncClone impl for structs that implement Clone
- ockam - Use async_trait through ockam_core
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
353 pull requests were merged in the last week
- add new tier-3 target: armv7-unknown-linux-uclibceabihf
- perform type inference in range pattern
- add abs_diff for integer types
- implement #85440 (Random test ordering)
- correctly handle supertraits for min_specialization
- consider unfulfilled obligations in binop errors
- add
deref_into_dyn_supertrait
lint - note specific regions involved in 'borrowed data escapes' error
- fix suggestion to borrow when casting from pointer to reference
- feature gate the non_exhaustive_omitted_patterns lint
- fix ICE caused by non_exaustive_omitted_patterns struct lint
- perf: only check for
rustc_trivial_field_reads
attribute on traits, not items, impls, etc. - perf: introduce
tcx.get_diagnostic_name
- improved help message for
suspicious_map
- emit item no type error even if type inference fails
- optimize File::read_to_end and read_to_string
- prevent error reporting from outputting a recursion error if it finds an ambiguous trait impl during suggestions
- create more accurate debuginfo for vtables.
- make cfg imply doc(cfg)
- show detailed expected/found types in error message when trait paths are the same
- fix docblock code display on mobile
- use correct edition for panic in (
debug_
)assert!()
- add
core::array::from_fn
andcore::array::try_from_fn
- add
Ipv6Addr::is_benchmarking
- add functions to add unsigned and signed integers
- implement advance_(back_)_by on more iterators
- array
.len()
MIR optimization pass path.push()
should work as expected on windows verbatim paths- use get_unchecked in
str::
(r
)split_once
- stabilize
try_reserve
- stabilize
proc_macro::is_available
- stabilize
const_panic
- stabilize
command_access
- futures: make
futures::task::noop_waker_ref
available withoutstd
. rustc_codegen_gcc
: add missing cast and change some bitcasts to casts to avoid a gimple verification failure- rustfmt: stabilize
match_block_trailing_comma
- rustfmt: wrap long array and slice patterns.
- rustdoc: migrate to table so the gui can handle >2k constants
- clippy: add
undocumented_unsafe_blocks
lint - clippy: fix false positive in external macros for
mut_mut
lint - clippy: fix false positive when
Drop
andCopy
involved infield_reassign_with_default
lint - clippy: handle intra-doc links in
doc_markdown
- clippy: refactor
clippy::match_ref_pats
to check for multiple reference patterns - clippy: make
shadow_reuse
suggestion less verbose - clippy: add option to
new_lint
to generate MSRV enabled lint - clippy: drop exponent on suggestion when exponent value is zero
Rust Compiler Performance Triage
A relatively quiet week: two smallish regressions, and one largish regression that is isolated to doc builds. A couple of nice small wins as well.
Triage done by @pnkfelix. Revision range: 25ec82..9475e6
2 Regressions, 2 Improvements, 2 Mixed; 1 of them in rollups 42 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] Stabilize is_symlink() for Metadata and Path
- [disposition: merge] Partially stabilize duration_consts_2
- [disposition: merge] Stabilize unreachable_unchecked as const fn
- [disposition: merge] Add
#[repr(i8)]
to Ordering - [disposition: merge] Fix ctrl-c causing reads of stdin to return empty on Windows.
- [disposition: merge] linux/aarch64 Now() should be actually_monotonic()
- [disposition: merge] Stabilise unix_process_wait_more, extra ExitStatusExt methods
- [disposition: merge] Make all proc-macro back-compat lints deny-by-default
- [disposition: merge] Windows: Resolve process::Command program without using the current directory
- [disposition: merge] Implement RefUnwindSafe for
Rc<T>
- [disposition: merge] Make two Paths unequal if they differ in trailing slash
- [disposition: merge] Reject octal zeros in IPv4 addresses
- [disposition: merge] Automatic exponential formatting in Debug
- [disposition: merge] Tracking Issue for methods to go from nul-terminated
Vec<u8>
to CString
New RFCs
No new RFCs were proposed this week.
Upcoming Events
Online
- October 13, 2021 - betterCode Rust
- October 13, 2021 - C++/Rust: Learning from Each Other - MUC++
- October 13, 2021, Los Angeles, CA, US - Processing shaders in Rust with Dzmitry Malyshau - Rust Los Angeles
- October 20, 2021, Buffalo, NY, US - Buffalo Rust User Group, Alternate Day - Buffalo Rust
- October 20, 2021, Vancouver, BC, CA - WASM plugin for Istio - Vancouver Rust
North America
- October 13, 2021, Atlanta, GA, US - Grab a beer with fellow Rustaceans - Rust Atlanta
- October 22, 2021, IR - The First Rust Iran online meetup - Rust Iran Meetup
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
System 76
Enso
Second Spectrum
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Rust is the language where you get the hangover first.
– unattributed via Niko Matsakis' RustConf keynote
Thanks to Alice Ryhl for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.