Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. 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
No papers/research projects this week.
Official
- [Inside] Core Team updates
- [Foundation] Introducing Peixin Hou
- [Foundation] Introducing Florian Gilcher
Newsletters
Project/Tooling Updates
- GCC Rust Monthly Report #4 March 2021
- mrustc upgrade: rustc 1.39.0
- rust-analyzer Changelog #71
- A new Left Recursive PEG Parser Generator for rust
- Last Month in Flott (Motion Control Toolkit in Rust) - April 2021
- Recent updates in IntelliJ Rust
- Bevy 0.5
Observations/Thoughts
- Interfacing a low-level actor system to Rust async/await, part 1
- A Tour of Safe Tracing GC Designs in Rust
- How I Used Rust + Lunatic to Build a TelNet Chat Server with WebAssembly
- Eliminating Data Races in Firefox - A Technical Report
- First-class IO
- The modern packager's security nightmare
- Ordering Requests to Accelerate I/O
- An essay of checked exceptions in Rust
- Weird architectures weren't supported to begin with
- [video] I tried learning OpenGL in 7 days - using Rust
Rust Walkthroughs
- How we built our Python Client that's mostly Rust
- Hello world with KAS GUI
- How to create small Docker images for Rust
- Oxidizing the Kubernetes Operator
- Sending tuples from Node to Rust and back
- Getting started with Kafka and Rust: Part 1
- A Beginner's Guide to Handling Errors in Rust
- Using Seahorn
- Asynchronous streams in Rust (part 1) - Futures, buffering and mysterious compilation error messages
- [series] What would SQLite look like if written in Rust? — Part 3
- [video] Return a value from a function in Rust
- [video] Crust of Rust: Atomics and Memory Ordering
- [video] Async/Await in Rust: Introduction
- [video] OpenVehicleDiag Rust live coding with Macchina's A0!!
- [video] [series] Easy Rust - learn to program in Rust with simple English
Miscellaneous
- best-of-ml-rust: A ranked list of awesome machine learning Rust libraries
- Rust in the Android platform
- David Tolnay - thank you
- My "shiny future"
Crate of the Week
This week's crate is rs-pbrt, a counterpart to the PBRT book's (3rd edition) C++ code.
Thanks to Jan Walter for the suggestion!
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 Rust Core
313 pull requests were merged in the last week
- fix stack overflow detection on FreeBSD 11.1+
- disallow the use of high byte registes as operands on
x86_64
- resolve/expand: cache intermediate results of
#[derive]
expansion - panic early when
TrustedLen
indicates alength > usize::MAX
- suggest
box
/pin
/arc
ing receiver on method calls - run LLVM coverage instrumentation passes before optimization passes
- simplify logical operations CFG
- remove unneeded type resolving
- unaligned_references:
align(N)
fields inpacked(N)
structs are fine - prevent very long compilation runtimes in
LateBoundRegionNameCollector
- reduce the impact of
Vec::reserve
calls that do not cause any allocation - BTree: no longer search arrays twice to check
Ord
- stream the dep-graph to a file instead of storing it in-memory
- implement
SourceIterator
andInPlaceIterable
forResultShunt
- optimize jumps in
PartialOrd::le
ffi::c_str
removed bound checks onas_bytes
,to_bytes
- added
as_slice
method toBinaryHeap
collection - use
#[inline(always)]
on trivialUnsafeCell
methods - add
#[inline]
toIpAddr
methods - disallow octal format in Ipv4 string
- constify methods of
std::net::SocketAddr
,SocketAddrV4
andSocketAddrV6
- constify some slice methods
- stdsimd: add saturating abs/neg
- hashbrown: make
RawTable::insert_no_grow
unsafe - cargo: add cargo config subcommand
- rustdoc: only look at blanket impls in
get_blanket_impls
- rustdoc: add unstable option to only emit shared/crate-specific files
- rustdoc: don't enter an
infer_ctxt
inget_blanket_impls
for impls that aren't blanket impls - rustdoc: highlight macros more efficiently
- clippy: add
non_octal_unix_permissions
lint - clippy: don't lint
manual_map
in const functions - clippy: new Lint:
needless_for_each
- clippy: new Lint:
branches_sharing_code
- clippy: lint:
filter(Option::is_some).map(Option::unwrap)
- clippy: remove author requirement for
cargo_common_metadata
- Clippy going dark: adding a dark theme to Clippy's lint list
- crates.io: topologically sort
db-dump.tar.gz
- parallelize tidy
Rust Compiler Performance Triage
A pretty major week for memory usage improvements with an average of ~20% gains on memory usage for release builds, and 5% on check builds, due to an update in the default allocator used (to a more recent jemalloc). Wall time performance remained largely unchanged over this week.
Triage done by @simulacrum. Revision range: 4896450e..d32238
1 Regressions, 4 Improvements, 0 Mixed
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation 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
- [disposition: close] RFC: Structural Records
- [disposition: postpone] Hygiene opt-out (escaping) for declarative macros 2.0
- [disposition: postpone] RFC: Delegation
- [disposition: close] RFC:
#[derive_no_bound(..)]
and#[derive_field_bound(..)]
- [disposition: postpone] RFC: Eager Macro Expansion
- [disposition: merge] try_trait_v2: A new design for the
?
desugaring
Tracking Issues & PRs
- [disposition: merge] Remove
T: Debug
bound on UnsafeCell Debug impl - [disposition: merge] Turn old edition lint (anonymous-parameters) into warn-by-default on 2015
- [disposition: merge] Stabilize
rustdoc::bare_urls
lint - [disposition: merge] Tracking issue: fNN::is_subnormal
- [disposition: merge] Tracking Issue for feature(nonzero_leading_trailing_zeros)
- [disposition: merge] Tracking Issue for
{BTreeMap,BTreeSet}::retain
- [disposition: merge] Tracking Issue for
#![feature(const_cell_into_inner)]
- [disposition: merge] Tracking Issue for
atomic_fetch_update
- [disposition: merge] Tracking Issue for feature: "option_insert"
- [disposition: merge] Tracking Issue for
Duration
saturating operations - [disposition: merge] Tracking Issue for
Duration::{zero, is_zero} (#![feature(duration_zero)])
- [disposition: close] Tracking issue for FixedSizeArray trait
New RFCs
Upcoming Events
Online
- April 7, Johannesburg, ZA - Monthly Joburg Rust Chat! - Johannesburg Rust Meetup
- April 7, Indianapolis, IN, US - Indy.rs - with Social Distancing - Indy Rust
- April 12, Denver, CO, US - Building Delightful CLI Tools in Rust by Chuck Pierce - Rust Denver
- April 13, Seattle, WA, US - Monthly Meetup - Seattle Rust Meetup
- April 13, Saarbrücken, Saarland, DE - Rust Saar 10u16
- April 20, Washington, DC, US - The Rust Borrow Checker—A Deep Dive - Rust DC
North America
- April 8, Columbus, OH, US - Monthly Meetup - Columbus Rust Society
- April 14, Atlanta, GA, US - Grab a beer with fellow Rustaceans - Rust Atlanta
Asia Pacific
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
IOTA Foundation
Parity Technologies
Microsoft
- Azure IoT Senior Software Engineer (remote possible within U.S.)
- Junior developers should also apply but relocation to Redmond is necessary in that case.
Wallaroo
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Sadly there was no quote nominated for this week.
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.