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
- Brainstorming Async Rust's Shiny Future
- [Foundation] Introducing Florian Gilcher
- [Foundation] Introducing Peixin Hou
Newsletters
Project/Tooling Updates
- Progress report on rustc_codegen_cranelift (April 2021)
- IntelliJ Rust: Updates for 2021.1
- IntelliJ Rust Changelog #145
- rust-analyzer Changelog #72
- Ballista has been donated to the Apache Arrow project
Observations/Thoughts
- Rust in Production: MeiliSearch
- Rust is for Professionals
- Rust async is colored, and that's not a big deal
- Using Rust for Scientific Numerical applications: Learning from Past Experiences
- PlaintDB Servers - another milestone reached
- Why Rust for Robots?
- Integrating const-generics to nalgebra 0.26
- [podcast] Building with Rust: Tim McNamara on Rust in Action [transcript]
Rust Walkthroughs
- Build an End-to-End Encrypted messaging app in rust, with the Ockam crate, in this step by step guide.
- Introducing easy-cast
- Why Rust strings seem hard
- Rust shenanigans: return type polymorphism
- Writing Neovim plugins in Rust
- A zero-overhead linked list in Rust
- Integrating Rust into Python
- Setting Up a gRPC Protobuf Server With Tonic
- Getting started with Kafka and Rust: Part 2
- Rust lib error management, multiple enum approach
- Asynchronous streams in Rust (part 2) - Cancelling expired requests
- [series] Engaging Warp: REST API with Rust
- [ZH] [series] Build GraphQL services based on Async Rust using tide + async-graphql + mongodb (基于 Async Rust 构建 GraphQL 服务,使用 tide + async-graphql + mongodb) - Part 1
- [video] Flocking Boids in Rust: With Piston vs Tetra vs Amethyst vs Bevy
Miscellaneous
- Rust, not Firefox, is Mozilla's greatest industry contribution
- AWS's Shane Miller to head the newly created Rust Foundation
- [RFC] Rust support for Linux kernel
- A look at LLVM - comparing clamp implementations
- Tokio-uring design proposal
- Google is now writing low-level Android code in Rust
- Rust in the Linux kernel
Crate of the Week
This week's crate is dipa, a crate to derive delta-encoding for Rust data structures.
Despite a lack of nominations, llogiq is very pleased with his choice.
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
329 pull requests were merged in the last week
- allow specifying alignment for functions
- fix handling of
--output-format json
flag - don't tell users to use a nightly flag on the stable channel
- improve trait/impl method discrepancy errors
- account for
ExprKind::Block
when suggesting .into() and deref - let
#[allow(unstable_name_collisions)]
work for things other than function - add
bad_asm_style
toHardwiredLints
- improve debuginfo for closures and async functions on Windows MSVC
- use
AnonConst
forasm!
constants - add
FromIterator
andIntoIterator
impls forThinVec
- add
strong_count
mutation methods toRc
- use a
SmallVec
inimpl_or_trait_item
- use
FromStr
trait for number option parsing - reduce threads spawned by ui-tests
- core: disable
ptr::swap_nonoverlapping_one
's block optimization on SPIR-V - stabilize
cmp_min_max_by
- stabilize
peekable_peek_mut
- stabilize
duration_saturating_ops
- stabilize
atomic_fetch_update
methods onAtomicBool
andAtomicPtr
- fix
HashMap
/HashSet
LLDB pretty-printer after hashbrown - futures: move
try_fold
,try_for_each
, andtry_for_each_concurrent
toStreamExt
- futures: add
stream::Peekable::
{next_if
,next_if_eq
} - fix perf regression in
rustdoc::bare_urls
- rustdoc: cleanup handling of associated items for intra-doc links
- rustdoc: sort search index items for compression
- rustdoc: store intra-doc links in Cache instead of on items directly
- rustdoc: use
ThinVec
in a few places - rustdoc: merge idents when generating source content
- clippy: fix false positive in
single_component_path_imports
lint - clippy: fix
explicit_into_iter_loop
- clippy: consider mutability on
useless_vec
suggestions - clippy: fix
missing_panics_doc
not detectingassert_eq!
andassert_ne!
Rust Compiler Performance Triage
A very quiet week overall.
Triage done by @simulacrum. Revision range: d322385..5258a74
1 Regressions, 0 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: merge] RFC: Reserved prefixes in the 2021 edition
- [disposition: merge] try_trait_v2: A new design for the ? desugaring
- [disposition: merge] add const-ub RFC
- [disposition: merge] Target tier policy
- [disposition: postpone] RFC: Custom DSTs
Tracking Issues & PRs
- [disposition: merge] Cautiously add IntoIterator for arrays by value
- [disposition: merge] Stabilize Duration::MAX
- [disposition: merge] Stabilize
impl From<[(K, V); N]> for HashMap
- [disposition: merge] Allow setting
target_family
to multiple values, and implementtarget_family="wasm"
- [disposition: merge] Stabilize pat2015 but leave :pat2021 gated
- [disposition: merge] Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021
- [disposition: merge] Tracking Issue for 'ordering helpers'
- [disposition: merge] Tracking issue for array::from_ref and array::from_mut
- [disposition: merge] Tracking issue for x86 bittest intrinsics
- [disposition: merge] Tracking issue for RFC 2457, "Allow non-ASCII identifiers"
New RFCs
Upcoming Events
Online
- April 20, Washington, DC, US - The Rust Borrow Checker—A Deep Dive - Rust DC
- April 21, Vancouver, BC, CA - Rust Study/Hack/Hang-out night - Vancouver Rust
- April 27, Dallas, TX, US - Last Tuesday - Dallas Rust
North America
Asia Pacific
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
Slight
Kraken
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
What I actually value on a daily basis in [rust is] I can call code written by other people without unpleasant surprises.
async fn verify_signature(token: &Jwt) -> Result<Claims, VerificationError>
Looking at a code snippet:
- I know my JWT token won't be mutated, just accessed (
&
);- I know the function will probably perform some kind of I/O (
async
);- I know that the function might fail (
Result
);- I know its failure modes (
VerificationError
).
Thanks to Nixon Enraght-Moony for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.