Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. 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.
We Stand With You 🇺🇦
Since our previous issue, Russia has launched an invasion of the sovereign nation of Ukraine with assaults on the civilian population, resulting in hundreds of civilian casualties so far. We stand with Ukraine and our Ukrainian siblings now and always.
The Rust Code of Conduct ensures a safe place for everyone, including those that have traditionally suffered from political attacks on their right to exist. We believe all people have a right to live in peace and a right to self-determination.
If you want to show your support, Global Citizen has a list of curated resources for donating, taking action, and staying informed.
Updates from Rust Community
Official
Project/Tooling Updates
- Rust-Analyzer Changelog #118
- GCC Rust Monthly Report #14 February 2022
- rustc_codegen_gcc: Progress Report #9
- Announcing Actix Web v4.0
- Fornjot (Code-CAD in Rust) - Weekly Dev Log - 2022-W08
- Slint (formerly SixtyFPS, UI crate) weekly update
- Announcing Rust runtime for AWS Lambda 0.5
- BonsaiDb February update: Supporting and Optimizing BonsaiDb
- Wasmer 2.2: Major Singlepass Improvements
- OpenMLS v0.4 Release
- This week in Databend #31: A Modern Cloud Data Warehouse for Everyone
Research
- Assessing the alignment between the information needs of developers and the documentation of programming languages: A case study on Rust
- [video] Talk on Pattern-defeating Quicksort, the algorithm behind
sort_unstable
Observations/Thoughts
- How to speed up the Rust compiler in 2022
- IDEs and proc-macros
- Mental models for learning Rust
- Warnings and Linter Errors: The Awkward Middle Children
- CXX-Qt - Safe Rust Bindings for Qt
- TreeFlat: Building a (possible) faster tree for Rust, inspired by APL
- Discussion: New
unchecked
keyword - [video] Rust's Vision in 2022
- [ZH] [audio] 与黄光星畅聊 Rust、Redis 与新加坡
Rust Walkthroughs
- Rust's Rules are Made to Be Broken
- The foundations of end-to-end encryption: Key exchange (with code example in Rust)
- Background jobs in Rust
- Shaking off the Rust
- Integrating Rust With Android Development
- A taste of Rust
- Rust: Adding default cargo features without breaking Semantic Versioning
- Highway to the TrustZone (Using Rust with TrustZone-M)
- Building a new graphics engine in Rust - Part 2
- [DE] Ferris Talk #6: Ein neuer Trick für die Formatstrings in Rust
- [series] [video] Writing a Programming Language (in Rust) 18: Laurel: Calling a string as a process
- [series] [video] Writing a Programming Language (in Rust) 19: Laurel: Streamlining subcommands
Miscellaneous
- Modern Telecom Network Tracing
- Achieving >1TB/hr backup speed by implementing the core client-side data pipeline in Rust
- Black Hat Rust Cyberwar Discount
- [DE] Programmiersprache Rust 1.59 integriert Assembler-Code
Crate of the Week
This week's crate is prae, a crate with macros to define types with inbuilt invariants.
Thanks to Alex for the self-suggestion!
Please 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.
ripzip2
rust
- Rare case of not properly rounding up thread stack size on Windows
- Document that Display entails ToString
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
319 pull requests were merged in the last week
- apply noundef attribute to all scalar types which do not permit raw init
- apply noundef metadata to loads of types that do not permit raw init
- suggest a float literal when dividing a floating-point type by
{integer}
- suggest adding
{ .. }
around more bad const generic exprs - suggest calling
.display()
onPathBuf
too - do not suggest using a const parameter when there are bounds on an unused type parameter
- do not suggest wrapping an item if it has ambiguous un-imported methods
- diagnostic: suggest parens when users want logical ops, but get closures
- better error if the user tries to do assignment ...
else
- rustc_errors: let
DiagnosticBuilder::emit
return a "guarantee of emission" - consider mutations as borrows in generator drop tracking
- miri: prune backtraces similar to
RUST_BACKTRACE=1
logic - miri: prune stacktraces for tag-tracking diagnostics too
- fix ICE when passing block to while-loop condition
- fix ICE when using
Box<T, A>
with large A - convert
newtype_index
to a proc macro - gracefully handle non-UTF-8 string slices when pretty printing
- improve string literal unescaping
- introduce
ChunkedBitSet
and use it for some dataflow analyses - simplify
rustc_serialize
by dropping support for decoding into JSON - only create a single expansion for each inline integration
- remove in band lifetimes
- codegen_gcc: add support for
on_stack
parameters - codegen_gcc: don't export global allocs which are not statics
- codegen_gcc: fix miscompilation when
cg_ssa
is using multiple builders at the same time - codegen_gcc: support
-Cpanic=unwind
without unwinding - implement
LowerHex
onScalar
to clean up their display in rustdoc - add
slice::
{from_ptr_range
,from_mut_ptr_range
} - futures:
FuturesUnordered
: fix partial iteration - portable-simd: bitmask conversion trait
- cargo: implement "artifact dependencies" (RFC #3028)
- cargo: add
-Z check-cfg-features
to enable compile-time checking of features - cargo: add common profile validation
- cargo: enable propagating host rustflags to build scripts
- clippy: add
print_in_format_impl
lint - clippy: disable
new-without-default
for#[doc(hidden)] new()
methods - clippy: false positive
redundant_closure
when using ref pattern in closure params - clippy: fix
ptr_arg
- clippy: fix some
unnecessary_filter_map
false positives - clippy: fix false positives of
large_enum_variant
Rust Compiler Performance Triage
A relatively noisy week in performance measurements, particularly on the
externs
incremental benchmark. Based on the timing of the first noise, this
seems to be due to #93839, which makes me suspect this is related to PGO or
inlining decisions of some kind. #94373 might help.
Overall a relatively unchanged to slightly good week, with no outright regressions and most changes relatively small.
Triage done by @simulacrum. Revision range: 1204400a..f0c4da4
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] Add vendor-specific suffixes to v0 mangling RFC 2603
Tracking Issues & PRs
- [disposition: merge] Rename unix::net::SocketAddr::from_path to from_pathname and stabilize it
- [disposition: merge] Tracking issue for Vec::retain_mut and VecDeque::retain_mut
- [disposition: merge] Stabilize const_fn_fn_ptr_basics, const_fn_trait_bound, and const_impl_trait
- [disposition: merge] Tracking Issue for const_intrinsic_copy
- [disposition: merge] Implement
Write for Cursor<[u8; N]>
, plusA: Allocator
cursor support
New and Updated RFCs
- No new or updated RFCs were submitted this week.
Upcoming Events
Rusty Events between 2022-03-02 - 2022-03-30 🦀
Virtual
- 2022-03-02 | Berlin, DE | OpenTechSchool Berlin
- 2022-03-02 | Indianapolis, IN, US | Indy Rust
- 2022-03-02 | Vienna, AT | Mob-Programming on Open Source Software
- 2022-03-03 | Cardiff, UK | Rust and C++ Cardiff
- 2022-03-03 | Würzburg, DE | Rust Würzburg Meetup Group
- 2022-03-03 | Scylla
- 2022-03-07 | Valence, FR | Ardèch’Drôm Dev
- 2022-03-08 | Dallas, TX, US | Dallas Rust
- 2022-03-08 | Rostock, DE | Altow Academy
- 2022-03-08 | Saarbrücken, DE | Rust-Saar
- 2022-03-08 | Seattle, WA, US | Seattle Rust Meetup
- 2022-03-09 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-03-09 | München, DE | Rust Munich
- 2022-03-09 | Selangor, MY | Rust Malaysia
- 2022-03-09 | Stuttgart, DE | Rust Community Stuttgart
- 2022-03-10 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-03-15 | Berlin, DE | OpenTechSchool Berlin
- 2022-03-15 | Dublin, IE | Rust Dublin
- 2022-03-15 | Washington, DC, US | Rust DC
- 2022-03-16 | Vancouver, BC, CA | Vancouver Rust
Europe
- 2022-03-15 | Sofia, BG | Rust Meetup Sofia
North America
- 2022-03-14 | Atlanta, GA, US | Atlanta Rustaceans
- 2022-03-15 | San Francisco, CA, US | San Francisco Rust Study Group
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
Tangram
LoanPASS
Kollider
Starry
- Manager, Systems Software Engineering (Boston, MA, US)
- Principal Systems Software Engineer (Boston, MA, US)
Kraken
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
- Rust Engineer - Banking (Remote)
Parity Technologies
- Parachains Engineer - Common Good
- Core Runtime Engineer - Substrate
- Rust Core Engineer - Solidity Compiler (Solang)
- Multiple other Rust / Blockchain Engineering positions
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Due to recent events I feel the need to once again commend the reviewers and ehuss in particular for their amazing communication skills when reviewing PRs like this. I can only imagine how much work it means and how silly some of the changes proposed here might look to a seasoned cargo developer, yet you maintain a constructive, upbeat, and friendly spirit at all times. It's a style that I am aspiring when reviewing PRs myself, and is a prime example for the accessibility and friendliness of the Rust community as a whole.
Thank you!
– Sebastian Thiel commending Eric Huss on GitHub
Thanks to Jacob Finkelman for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin.
Email list hosting is sponsored by The Rust Foundation