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 newsletters or official blog posts this week.
Project/Tooling Updates
Observations/Thoughts
- 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 Walkthroughs
- 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
Miscellaneous
- 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!
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.
starlight - Support for "unsafe" cases of finally
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
const
item if thefn
in the array is aconst fn
- fixing bad suggestion for
_
inconst
type when a function - simplify
eat_digits
- precompute ancestors when checking privacy
- optimize counting digits in line numbers during error reporting
- only store a
LocalDefId
in some HIR nodes - to digit simplification
- reduce size of
InterpErrorInfo
to 8 bytes - pass large interpreter types by reference, not value
- improve
assert_eq!
andassert_ne!
- add
Mutex::unlock
- stabilize
Arguments::as_str
- futures:
FuturesUnordered
: do not poll the same future twice per iteration - remove
unsafe impl Send for CompletedTest
&TestResult
- test: print test name only once on timeout
- cargo: propagate
lto=off
harder
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
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] Allow specifying alignment for functions
- [disposition: merge] Make rustdoc lints a tool lint instead of built-in
- [disposition: merge] Stabilize
unsafe_op_in_unsafe_fn
lint - [disposition: merge] [librustdoc] Only split lang string on
,
,, and
\t
- [disposition: merge] Lint for unused borrows as part of
UNUSED_MUST_USE
- [disposition: merge] Tracking Issue for str_split_once
- [disposition: merge] Tracking Issue for ASCII methods on OsStr
New RFCs
- 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
std::io::Error
to improvestd::io
error messages - Multi-part examples in rustdoc
Upcoming Events
Online
- 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
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
ForAllSecure
NZXT
Parity
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!
– Simon Chemouil on the Kraken blog
Thanks to scottmcm for the suggestion.
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.