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
Newsletters
Project/Tooling Updates
- rust-analyzer Changelog #61
- Performance improvement on front-end generated by rustdoc
- Criterion.rs v0.3.4 and Iai 0.1.0
- The RustyHermit Unikernel
- Introducing usb-ids.rs
- ⚡️ Dotenv-linter v3.0.0: Overview 🦀
- 🧮 An Auto-Increment Crate for Rust
Observations/Thoughts
- Porting a serverless chatbot from Python to Rust
- Unsafe Rust: How and when (not) to use it
- Rust and Go department directories
- Parsing real-world data with Rust: introducing the alias_all attribute in Serde
Rust Walkthroughs
- Wrapping Errors in Rust
- Implementing Raft's Leader Election in Rust
- 2048 WASM
- Implementing an LRU Cache in Rust
- JSON input validation in Warp
- Make A Language - Part Nineteen: Code Representations
- Make A Language - Part Twenty: Testing
- How to optimise compilation times with Rust
- Automatic flamegraphs for benchmarks with Criterion
- First time using Yew: A Go game board in just a few lines of Rust.
- [ES] El juego de la vida usando Rust y Iced
Miscellaneous
- Are we learning yet?
- Microsoft Opens Up Old Win32 APIs to C# and Rust, More Languages to Come
- A fix for the LLVM noalias bug has landed in time for LLVM 12 branches
- Dynamic type systems aren't even simpler
- Everywhere I go, I miss Rust's `enum`s
- Open-Source Rust: 24 Awesome Frameworks, Projects, and Libraries
Crate of the Week
This week's crate is aquamarine bringing you inline diagrams for your rustdocs.
Thanks to Willi Kappler 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
299 pull requests were merged in the last week
- improve unknown external crate error
- gracefully handle loop labels missing leading
'
in different positions - improve diagnostics when parsing angle args
- permit mutable references in all const contexts
- prevent query cycles in the MIR inliner
- mir: improve
size_of
handling when arg is unsized - implement
Error
for&(impl Error)
- change branching in
iter.skip()
BufWriter
: Provideinto_raw_parts
- fix soundness issue for
replace_range
andrange
- avoid
hash_slice
inVecDeque
'sHash
implementation - turn alloc's force_expr macro into a regular macro_rules
- hashbrown: add
try_insert_no_grow
method onRawTable
- fix a bug in Cargo's cyclic dep graph detection
- cargo: add some extra help to
cargo new
and invalid package names - rustdoc: fix rendering of stabilization version for trait implementors
- clippy:
manual_filter_map
andmanual_find_map
- clippy: new lint:
exhaustive_enums
,exhaustive_structs
Rust Compiler Performance Triage
This week continues a trend of relatively large rollups, which often contain perf-sensitive PRs. We need to get better at marking PRs as rollup=never or otherwise not including them, but it is unclear how precisely to go about doing so. The tooling for testing individual PRs merged in rollups should also be improved to work better in the next few days, though.
Other than that, this week saw several regressions, most of which were not easily explained. We are seeking feedback from PR authors and reviewers on whether the results are expected and if anything can be done.
Triage done by @rylevick and @simulacrum. Revision range: e05409a02c6e73a3dea6da98798468db2910ca59..1483e67addd37d9bd20ba3b4613b678ee9ad4d68
5 Regressions, 2 Improvements, 1 Mixed; 3 of them in rollups
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:
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] 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] Stabilize
peekable_next_if
- [disposition: merge] rustc: Stabilize
-Zrun-dsymutil
as-Csplit-debuginfo
- [disposition: merge] Stabilize Arc::{increment,decrement}_strong_count
- [disposition: merge] expand/resolve: Turn
#[derive]
into a regular macro attribute - [disposition: merge] Implement io::Seek for io::Empty
- [disposition: merge] Tracking Issue for
feature(int_bits_const): <integer>::BITS
- [disposition: merge] Tracking Issue for
fmt::Arguments::as_str()
New RFCs
Upcoming Events
Online
- Februar 2, Dublin, IE - Rust Dublin Remote February Meetup - Rust Dublin
- February 2, Buffalo, NY, US - Buffalo Rust User Group - Buffalo Rust Meetup
- February 2, Denver, CO, US - ML in Rust, implementing logistic and linear regression from scratch - Rust Denver
- February 3, Johannesburg, ZA - Monthly Joburg Rust Chat! - Johannesburg Rust Meetup
- February 4, Berlin, DE - Rust Hack and Learn - Berline.rs
- February 4, Budapest, HU - Rust meetup S03! - Rust Hungary Meetup
- February 7, Indianapolis, IN, US - Monthly Meetup - Indy.rs
- February 9, Seattle, WA, US - Monthly Meetup - Seattle Rust Meetup
North America
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
- Engineer or Manager - Rust at Faraday (Burlington, VT, US (and Boston, MA, US))
- Rust Engineer at The Graph (Remote)
- Rust Expert - Senior Software Engineer at Wasmer (San Francisco, CA, US or Remote)
- Ethereum Core Developer (m/w/d) at Gnosis (Berlin, DE or A Coruña, ES, or Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Describing Rust as a systems programming language in 2021 is like describing Microsoft as Windows or Google as search. Yes, Rust is equipped for systems programming, but its applicability is much wider.
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.