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.
Updates from Rust Community
No newsletters or official blog posts this week.
- Rust for web development: 2 years later
- Integrating Rust and C++ in Firefox
- Building a telnet chat server with Rust and Lunatic
- Against Packaging Rust Crates
- Why building a front-end framework in Rust is hard
- Oxidizing Kraken
- Maybe We Can Have Nice Things
- Three Things I Miss About Rust
- Storages: an alternative to allocators
- Rust ownership, the hard way
- Handling Unix Kill Signals in Rust
- Replacing FastAPI with Rust: Part 5 - Rocket 0.5
- Running ML models in a game (and in Wasm!)
- What would SQLite look like if written in Rust? - Part 2
- A primer on code generation in Cranelift
- Testing a Hardware Abstraction Layer (HAL)
- Cross Compiling Rust GTK Projects for Windows
- Procedural Macros: A simple derive macro
- Building an OpenStreetMap app in Rust, Part III
- Generalizing over Generics in Rust (Part 1.5): Mechanisms
- Macros in Rust: A tutorial with examples
- [ES] Pipelines en Rust(II)
- [video] Rust for Windows
- [video] Crust of Rust: Subtyping and Variance
- [video] Learning Rust: Web Server with Actix Web
- [video] [series] Rust For Beginners - Watch me code the Rustlings Tutorial
- [video] [series] Easy Rust - learn to program in Rust with simple English
- Python cryptography, Rust, and Gentoo
- Mitigating Memory Safety Issues in Open Source Software
- matklad @ NEAR
- Application-wide panic handling
- Benchmarking low-level I/O: C, C++, Rust, Golang, Java, Python
- [video] Ask the Expert: Rust at Microsoft
- [video] AWS re:Invent 2020: Next-gen networking infrastructure with Rust and Tokio
- [video] Interview Part 2/2 with Ashley Williams, Rust Foundation Interim Executive Director
Crate of the Week
This week's crate is lever, a library for writing transactional systems.
Thanks to Mahmud Bulut for the suggestion!
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
- suggest to create a new
constitem if the
fnin the array is a
- fixing bad suggestion for
consttype when a function
- precompute ancestors when checking privacy
- optimize counting digits in line numbers during error reporting
- only store a
LocalDefIdin some HIR nodes
- to digit simplification
- reduce size of
InterpErrorInfoto 8 bytes
- pass large interpreter types by reference, not value
FuturesUnordered: do not poll the same future twice per iteration
unsafe impl Send for CompletedTest&
- test: print test name only once on timeout
- cargo: propagate
Rust Compiler Performance Triage
Overall, a positive week for compiler performance with only one moderate regression. The change that introduced the regression leads to significantly improved bootstrap speed of the compiler as well as easier maintainability.
Triage done by @rylev. Revision range: f1c47c..301ad8a
1 Regression, 5 Improvements, 0 Mixed 0 of them in rollups
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.
- [disposition: merge] Allow specifying alignment for functions
- [disposition: merge] Make rustdoc lints a tool lint instead of built-in
- [disposition: merge] Stabilize
- [disposition: merge] [librustdoc] Only split lang string on
- [disposition: merge] Lint for unused borrows as part of
- [disposition: merge] Tracking Issue for str_split_once
- [disposition: merge] Tracking Issue for ASCII methods on OsStr
- RFC: An edition-compatible system for "removing" deprecated items from the standard library
- RFC: Declarative macro metavariable expressions
- RFC: 2021 Edition
- Add filename information to
- Multi-part examples in rustdoc
- February 27, London, UK - Rust (Remote) Hack & Learn - Rust London
- March 1, Cardiff, UK - Rust and Cpp Cardiff :: v1.9 - Rust and C++ Cardiff
- March 2, Dublin, IE - March Remote Meetup - Luca Palmieri - Rust Dublin
- March 3, Indianapolis, IN, US - Indy.rs - with Social Distancing - Indy Rust
- March 3, Denver, CO, US - Building a Runtime Reflection System for Rust by Sam Scott - Rust Denver
- March 4, Berlin, DE - Rust Hack and Learn - Berline.rs
- March 9, Saarbücken, Saarland, DE - Meetup: 9u16 (virtual) - Rust Saar
- March 9, Seattle, WA, US - Monthly meetup - Seattle Rust Meetup
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Finally, I feel it is necessary to debunk the “fighting the borrow checker” legend, a story depicting the Rust compiler as a boogeyman: in my experience, it happens mostly to beginners and the 1% trying to micro-optimize code or push the boundaries. Most experienced Rust developers know exactly how to model their code in a way that no time is wasted fighting the compiler on design issues, and can spot anti-patterns at a glance, just like most people know how to drive their car on the correct side of the road to avoid accidents, and notice those who don’t!
Thanks to scottmcm for the suggestion.