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
- Rust Compiler April 2022 Steering Cycle
- Please welcome Thom and Chris to Library Contributors
- Imposter Syndrome
Foundation
Project/Tooling Updates
- MnemOS Initial Release Announcement
- Bevy 0.7
- rust-analyzer changelog #125
- Fornjot (Code-CAD in Rust) - Weekly Dev Log - 2022-W15 (Pre-Vacation Edition)
- Rewriting sysctl(8) in Rust (systeroid)
- Postage v0.5.0
- Slint (GUI crate) weekly update
- This week in Fluvio #29: the programmable streaming platform
- This week in Databend #38: A Modern Cloud Data Warehouse for Everyone
Observations/Thoughts
- Why You Should Be Worried About the Future of C/C++ in Embedded: A Case for Rust
- Coherence and crate-level where-clauses
- How Async Functions in Traits could Work in Rustc
- Choosing the Right Integers
- Rustaceans at the border
- Building a new terminal - using macOS Metal APIs for UI rendering (interview with Warp)
- 35 Rust Learning Resources Every Beginner Should Know in 2022
- We asked 5 people why they like Embedded Rust
- A Performance Evaluation on Rust Asynchronous Frameworks
- Compile time evaluation in Nim, Zig, Rust and C++
- Including two versions of a Rust crate in a single project
- [video] 2022-04-20 Design Meeting: Felienne Hermans, Psychology of Programming
- [audio] Armin Ronacher on experimental deserialization with Deser
Rust Walkthroughs
- LoRaWAN Applications in Rust
- Building a crawler in Rust: Synchronization (Atomic Types and Barriers)
- Hostname based router with axum in Rust
- Command line argument parsing in Rust using Clap
- Full-text search for DynamoDB using Lambda, EFS, Tantivy and Rust
- Building and Deploying a URL shortener with Rust in 10 minutes or less
- Rust on Nails: A full stack architecture for Rust web applications
- An Intro to the Sauron web Framework
- [video] I'm in ur address space
- [video] A Mir Formality Walkthrough #1
Miscellaneous
Crate of the Week
This week's crate is ttrpc, a GRPC-like protocol implementation for memory-constrained environments.
Thanks to George Hahn 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
388 pull requests were merged in the last week
(note: We now also track rust-analyzer, which recently joined the rust-lang org)
- rustc_metadata: do not encode unnecessary module children
- miri: add size assertions for some core types
- miri: implement
strerror_r
- use
Span::find_ancestor_inside
to get right span inCastCheck
- when checking pointee metadata, canonicalize the
Sized
check - better method call ERROR messages
- consider lifetimes when comparing types for equality in MIR validator
- fix a bad error message for
relative paths are not supported in visibilities
error - improve diagnostics for unterminated nested block comment
- strict provenance lint diagnostics improvements
let_chains
: forbidlet
inside parentheses- make
unaligned_references
lint deny-by-default and make it show up in future-breakage report - prevent opaque types from appearing in impl headers
- fix suggestions in case of
T:
bounds - fix miscompilation of inline assembly with outputs in cases where we emit an invoke instead of call instruction
- remove function parameters only used in recursion
- optimize
<SourceFile as Decodable>::decode
- simplify const params diagnostic on stable
- stabilize
derive_default_enum
- stabilize
const_extern_fn
for "Rust" and "C" - move
CStr
to libcore, andCString
to liballoc - replace
ReentrantMutex
by a futex based one on Linux - replace
RwLock
by a futex based one on Linux - implement SIMD gather/scatter via vector
getelementptr
- faster parsing for lower numbers for radix up to 16 (cont.)
- implement
core::ptr::Unique
on top ofNonNull
- implement tuples using recursion
- optimize
RcInnerPtr::inc_strong()
/inc_weak()
instruction count - speed up
Vec::clear()
impl const Default for Box<[T]>
andBox<str>
- futures:
TryFlattenUnordered
- codegen_gcc: add feature for future libgccjit 12 release
- cargo: add support for
rustc --check-cfg
well known names and values - cargo: import
cargo-add
into cargo - cargo: completion support for
cargo-add
- rustdoc: discriminate required and provided associated constants and types
- rustfmt: fix exponential execution time by memoizing
format_expr
- rustfmt: preserve attributes for
imports_granularity=Item
- clippy: add
await_holding_invalid_type
lint - clippy: add
usize
cast tomanual_bits
suggestion - clippy: check for loops/closures in
local_used_after_expr
- clippy: do not trigger
rest_pat_in_fully_bound_structs
on#[non_exhaustive]
structs - clippy: don't lint
let_unit_value
when needed for type inferenece - clippy: don't lint
manual_non_exhaustive
when the enum variant is used - clippy: fix ICE in
undocumented_unsafe_blocks
- clippy: introduce
needless_option_take
lint - clippy: new lint
format_add_strings
- clippy: only lint
mut_from_ref
when unsafe code is used - clippy: prevent infinite (exponential) recursion in
only_used_in_recursion
- clippy:
pub_use
restriction - clippy: adding condition for
map_clone
message - clippy:
assertions_on_constants
: ignore indirectcfg!
- clippy: fix
unnecessary_to_owned
about msrv - rustup: don't prepend
$CARGO_HOME/bin
unnecessarily - rust-analyzer: derive completions take existing derives into count
- rust-analyzer: add trailing
;
when typing=
in assignment - rust-analyzer: attempt to format
expand_macro
output with rustfmt if possible - rust-analyzer: switch to LSP inlay hints
- rust-analyzer: allow customizing the command for running build scripts
- rust-analyzer: deprioritize already-imported names in
use
items - rust-analyzer: fix proc-macro change check being inverted
- rust-analyzer: show
impl Trait
in argument positon in completion details - rust-analyzer: enable ADT keyword completions in block expressions
- rust-analyzer: resolve
uN::method
even whenuse std::uN;
is present
Rust Compiler Performance Triage
A week with a large amount of changes in rollups, which makes performance triage difficult. The performance team and the infra team are working on finding ways to automate marking PRs as likely a poor choice for rolling up. Otherwise, the week overall saw a ~1% improvement in incremental check builds, with smaller improvements to incremental debug and release builds. A number of benchmarks have been updated in the last few weeks, which has meant a decrease in the automated noise assessment's algorithm performance, but that should settle out to steady state behavior on its own in the next few days.
Triage done by @simulacrum. Revision range: 949b98ca..4e1927d
5 Regressions, 4 Improvements, 7 Mixed; 7 of them in rollups 50 artifact 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:
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: merge] RFC: Add target configuration
Tracking Issues & PRs
- [disposition: merge] Stabilize let_chains in Rust 1.62.0
- [disposition: merge] Implement Default for AssertUnwindSafe
- [disposition: merge] Tracking Issue for const offset_from (const_ptr_offset_from)
New and Updated RFCs
- [new] Create a types team
Upcoming Events
Rusty Events between 2022-04-20 - 2022-05-18 🦀
Virtual
- 2022-04-20 | Cardiff, UK | Rust and C++ Cardiff
- 2022-04-20 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-04-20 | San Diego, CA, US | San Diego Rust
- 2022-04-20 | Vancouver, BC, CA | Vancouver Rust
- 2022-04-21 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-04-26 | Berlin, DE | OpenTechSchool Berlin
- 2022-04-26 | Dallas, TX, US | Dallas Rust
- 2022-04-26 | London, UK | Rust London User Group
- 2022-04-27 | Stuttgart, DE | Rust Community Stuttgart
- 2022-04-28 | Linz, AU | Rust Linz
- 2022-05-03 | Beijing, CN | WebAssembly and Rust Meetup (Rustlang)
- 2022-05-03 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-05-04 | Indianapolis, IN, US | Indy Rust
- 2022-05-04 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-05-05 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-05-10 | Berlin, DE | OpenTechSchool Berlin
- 2022-05-10 | Dallas, TX, US | Dallas Rust
- 2022-05-10 | Rostock, DE | Altow Academy
- 2022-05-10 | Seattle, WA, US | Seattle Rust Meetup
- 2022-05-11 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-05-12 | Nürnberg, DE | Rust Nurnberg DE
- 2022-05-12 | Stuttgart, DE | Rust Community Stuttgart
- 2022-05-17 | Washington, DC, US | Rust DC
- 2022-05-18 | Vancouver, BC, CA | Vancouver Rust
Europe
- 2022-04-26 | London, UK | Rust London User Group
North America
- 2022-04-27 | Boston, MA, US | Boston Rust Meetup
- 2022-05-11 | Atlanta, GA, US | Rust ATL
- 2022-05-12 | Columbus, OH, US | Columbus Rust Society
- 2022-05-17 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2022-04-21 | Melbourne, AUS | Rust Melbourne
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
Element
GMTO Organization
NXLog
KidsLoop
Timescale
Stockly
- Back-end developer (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer - Engine (Rust, gRPC, PostgreSQL) (Paris, FR)
Kollider
- Senior Frontend Engineer - Rust (Remote)
- Junior Backend Engineer - Rust (Remote)
- Senior Full Stack Developer - Rust (Remote)
Tempus Ex
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Alas, this week went by without any memorable quote.
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin.
Email list hosting is sponsored by The Rust Foundation