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
Official
- [Inside] Rustdoc performance improvements
- [Inside] Changes to the Rustdoc team
Newsletters
Project/Tooling Updates
- IntelliJ Rust Changelog #139
- rust-analyzer Changelog #60
- Knurling-rs Changelog #13
- This week in Ballista #1
- Deno in 2020
- async-std v1.9.0
- [video] Penrose 0.2.0 Overview
Observations/Thoughts
- Cryptoxide perf (SHA2 / Blake2)
- About variadics in Rust
- Rust in Production: 1Password
- Unconditional loops are unconditionally awesome
- Rust is a hard way to make a web API
- Writing a better Line Iterator in Rust
- Implementing cross-process Sanakirja locks
- future::join and const-eval
- I used Rust in production for 6 months! Here's my feedback
- [video] Learning Rust with "Too Many Linked Lists" (Episode 2) - Pop & Drop
- [video] std::process::exit is evil - a Rust bug fixing story
Rust Walkthroughs
- Polishing Rust: Boxing and Unboxing Results
- Efficient custom shapes in QtQuick with Rust
- Scientific Computing in Rust
- Rust GUI: Introduction a.k.a. the state of Rust GUI libraries (as of January 2021)
- How to Fetch a Web API with Rust 🦀
- Replacing FastAPI with Rust: Part 4 - A Solution
- Getting started with Rust and Redis
- How To Write A REST Client In Rust
- [video] Rust live coding - Tower deep dive
Miscellaneous
- Rust/WebAssembly on AWS Lambda@Edge
- [video] (Live Coding) Zola, a Static Site Generator. Migrating my blog & reviewing Zola's source code.
Crate of the Week
This week's crate is dotenv-linter, a lightning fast linter for .env
files.
Thanks to Grachev Mikhail 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
391 pull requests were merged in the last week
- use correct ABI for wasm32 by default
- improve diagnostics when closure doesn't meet trait bound
- enhance type inference errors involving the
?
operator - explain method-call move errors in loops
- make CTFE able to check for undefined behavior
- split a func into cold/hot parts, reducing rustc binary size
- suggest
_
and..
if a pattern has too few fields - suggest
async {}
forasync || {}
- do not suggest invalid code in pattern with loop
- add allow-by-default lint on implicit ABI in extern function pointers and items
- reintroduce
hir::ExprKind::If
- remove redundant
def_id
lookups - serialize incr comp structures to file via fixed-size buffer
- turn type inhabitedness into a query to fix
exhaustive_patterns
perf - box
Item::Attributes
- resolve: simplify collection of traits in scope
- use
Once
instead ofMutex
to manage capture resolution - consistently avoid constructing optimized MIR when not doing codegen
- add benchmark and fast path for
BufReader::read_exact
- add
MaybeUninit
methodarray_assume_init
- change
BinaryHeap::append
rebuild heuristic - implement
ptr::write
without dedicated intrinsic - introduce {
Ref
,RefMut
}::try_map
for optional projections inRefCell
- re-stabilize
Weak::as_ptr
and friends for unsized T - add
Iterator::intersperse_with
TrustedRandomAaccess
specialization composes incorrectly for nestediter::Zips
- remove unreachable panics from
VecDeque::
{front
/back
}(_mut
) - add
NonZeroU
n::is_power_of_two
- stabilize
split_inclusive
- stabilize the
poll_map
feature - add
as_rchunks
(and friends) to slices - hashbrown: hide allocator details and default to
Global
- hashbrown: export
AllocError
as well asAllocator
- regex: implement
regex::Replacer
forString
,&String
,Cow<'a, str>
,&Cow<'a, str>
- futures: fix type-inference in
sink::unfold()
by specifying more of its types - clippy: roadmap for 2021
Rust Compiler Performance Triage
- 2020-01-12: 1 Regressions, 2 Improvements, 3 Mixed Overall, a positive albeit quiet week. The largest change came from the incremental compilation working group which delivered large gains in performance caused by changes in how inlining is handled in debug mode. Unfortunately, these changes may be reversed due to concerns
Triage done by @rylev.
See the full report for more.
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
Tracking Issues & PRs
- [disposition: merge] Remove requirement that forces symmetric and transitive PartialEq impls to exist
- [disposition: merge] Stabilize
core::slice::fill_with
- [disposition: merge] Stabilize
unsigned_abs
- [disposition: merge] Add Box::downcast() for dyn Any + Send + Sync
- [disposition: merge] Stabilize by-value
[T; N]
iteratorcore::array::IntoIter
- [disposition: merge] Implement missing
AsMut<str>
forstr
- [disposition: merge] stabilise
cargo test -- --include-ignored
- [disposition: merge] rustc: Stabilize
-Zrun-dsymutil
as-Csplit-debuginfo
- [disposition: merge] Stabilize Arc::{increment,decrement}_strong_count
- [disposition: merge] Implement io::Seek for io::Empty
- [disposition: merge] Stabilize
Seek::stream_position
(featureseek_convenience
)
New RFCs
No new RFCs were proposed this week.
Upcoming Events
Online
- January 21, Berlin, DE - Rust Hack and Learn - Berline.rs
- January 26, Dallas, TX, US - Last Tuesay - Dallas Rust
- January 27, New York, NY, US - Snapshot testing in Rust with K9 with Aaron Abramov - Rust NYC
- February 2, Buffalo, NY, US - Buffalo Rust User Group - Buffalo Rust 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
- Rust Developer - Full Stack at HUM Systems (Berlin, DE)
- Multiple Roles at Ockam (Remote)
- Lead Developer Embedded Rust at Tweede Golf (Nijmegen, NL)
- Junior Rust Engineer at Bolt Labs (Remote, USA only)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Why do I use the letter ‘o’ for my generic closure param name? [...] I recently realized that since Rust uses pipes to enclose a param block, using ‘o’ makes the block look like a TIE fighter. I am not a terribly serious person.
Thanks to Edoardo Morandi for the suggestion.
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.