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? Tag us at @ThisWeekInRust on Twitter or @ThisWeekinRust on mastodon.social, 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
Foundation
- RustConf 2023 is Coming—Submit a Talk Today!
- Member Spotlight: HighTec
- Best Practices for Integrating Rust and Qt in Embedded Systems
Rust Nation 2023
- Opening Address - Rebecca Rumbul
- The Rustacean Cycle: Learn, Teach, Deliver - Nell Shamrell-Harrington
- Fast, Flexible Iteration with Rust and Rhai - Jonathan Strong
- iOS, Android and Web applications that share a single Rust core - Stuart Harris
- Tricks of the Trait: Enabling Ergonomic Extractors - Rob Ede
- Let's Get Rusty In Here - Daniel Thompson-Yvetot
- Let’s write async rust from the ground up! - Conrad Ludgate
- What I learned by solving 50 Advent of Code challenges in Rust - Luciano Mammino
- Spreading Rust to the rest of the company: Moving past the proof of concept - Tim McNamara
- A tale of binary translation - Amanieu D'Antras
- Embracing Rust at fly.io: How Rust powers our networking layer - Senyo Simpson
- Closing the Supply Chain Security Loop with Rust and Pyrsia - Steven Chin
- SurrealDB: from Golang to Rust — building the world’s fastest-growing db - Tobie Morgan Hitchcock
- Moving beyond
Arc<Mutex<T>>
- Katharina Fey - What does the Rust Foundation do? - Rust Foundation team
- Rust on RISC-V, a case study - Jorge Prendes and James Wainwright
- Rust in Rhymes II - Andre Bogus
- Living with Rust Long-Term - Jon Gjengset
Newsletters
Project/Tooling Updates
- Bevy 0.10
- rust-analyzer changelog #171
- Zellij 0.35.1 released: bringing Stacked Panes to your Terminal
- Oxy is Cloudflare's Rust-based next generation proxy framework
- Fornjot (code-first CAD in Rust) - Weekly Release - Progressed Extremely Well
- Databend 1.0 Release - The Future of Cloud Data Analytics
- Introducing runst: Handle desktop notifications neatly on Linux!
- A Windows software written in RUST available in the Microsoft Store
- This Month in hyper: February 2023
Observations/Thoughts
- Safety and Soundness in Rust
- Re-exporting an enum with a type alias is breaking, but not major
- Trait transformers (send bounds, part 3)
- Professional Rustacean, 3 months in
- Rust coding style
- Fixing the Next 10,000 Aliasing Bugs
- \Device\Afd, or, the Deal with the Devil that makes async Rust work on Windows
- (audio) Rustdoc with Joshua Nelson
- (audio) Asynchronix with Serge Barral
- (video) strace feels like magic — let’s fix that (with Rust)
- (video) Let's make an htop-like in your browser (with Rust)
- (video) Build your entire tech stack in Rust
Rust Walkthroughs
- Rust's BufRead, And When To Use It
- Getting Started with Rust & GPT-3
- Build a Ray Tracer, pt. 2 - Enter The Matrix
- Creating and publishing a Python package written in Rust
- The World's Smallest Hash Table
- Refactoring in Rust: Introducing Traits
- Embedded Rust on ESP32C3 Board, a Hands-on Quickstart Guide
- [video] Matching Braces With a Stack, Beginner Tutorial
Miscellaneous
- Academy Software Foundation Rust Working Group Status and Survey
- When Zig is safer and faster than Rust
Crate of the Week
This week's crate is man-in-the-middle-proxy, a - surprise! - man in the middle proxy.
Thanks to Emanuele Em 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 did not 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.
- Ockam - Create traits to abstract the configuration files handled by the CLI state
- Ockam - Create clap command to show the details of an existing TCP listener on a node
- Ockam - When running the credential store command, validate the credential before storing it
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
376 pull requests were merged in the last week
- apply BOLT optimizations without rebuilding LLVM
- add support for QNX Neutrino to standard library
- recover from for-else and while-else
- allow checking whether a type allows being uninitialized
- allow setting hashmap toml values in
./configure
- point error span at Some constructor argument when trait resolution fails
- deny capturing late-bound non-lifetime param in anon const
- descriptive error when users try to combine RPITIT/AFIT with specialization
- add warning on pre- and postfix decrement
- exit when there are unmatched delims to avoid noisy diagnostics
- erase all regions when probing for associated types on ambiguity in astconv
- erase regions even when failing to normalize type in MIR opts
- don't ICE when encountering bound var in builtin copy/clone bounds
- fix ICE: check if snippet is
)
- fix another ICE in
point_at_expr_source_of_inferred_type
- feed queries on impl side for RPITITs when using
lower_impl_trait_in_trait_to_assoc_ty
- make
associated_item_def_ids
for traits use an unstable option to also return associated types for RPITITs - new solver: implement canonicalization and region constraints
- don't project to RPITIT that has no default value
- desugaring of drop and replace at MIR build
- don't call
temporary_scope
twice - stabilize
cmpxchg16b_target_feature
- add
Atomic*::from_ptr
- add
Option::as_
(mut_
)slice
- fix
VecDeque::append
capacity overflow for ZSTs - use
partial_cmp
to implement tuplelt
/le
/ge
/gt
- add vectored positioned I/O on Unix
- cargo: breaking endless loop on cyclic features in added dependency in cargo-add
- cargo: fix
CARGO_CFG_
vars for configs defined both with and without value - cargo: fix help string for "--charset" option of "cargo tree"
- cargo: fix(toml): provide a way to show unused manifest keys for dependencies
- cargo: gitoxide integration: fetch
- cargo: improve error for missing crate in --offline mode for sparse index
- cargo: make
sparse
the default protocol for crates.io - rustdoc-json: switch from HashMap to FxHashMap to fix non-determinism
- rustdoc: function signature search with traits in
where
clause - rustdoc: reduce allocations when generating tooltips
- rustdoc: search by macro when query ends with
!
- rustdoc: show that repeated expression arrays can be made with constant values
- clippy: downgrade
let_underscore_untyped
to restriction - clippy: fix false positive for
let_unit_value
whenawait
used - clippy: fix ICE in
multiple_unsafe_ops_per_block
- clippy: fix
array-size-threshold
config deserialization error - clippy: fix various ICEs
- clippy:
missing_docs_in_private_items
should cover only private items - rust-analyzer: allow
generate_function
to generate in different local crate - rust-analyzer: diagnose unresolved field, method call and call expression
- rust-analyzer: diagnose value breaks in incorrect breakables
- rust-analyzer: make
replace_or_with_or_else
assists more generally applicable - rust-analyzer: adjust
replace_match_with_if_let
applicability range - rust-analyzer: don't drop rustc crates in the rustc workspace
- rust-analyzer: fix associated item visibility in block-local impls
- rust-analyzer: load the sysroot in all CLI commands
- rust-analyzer: run doctests for structs with lifetime parameters from IDE
- rust-analyzer: generate correct completion edits for missing macro arguments
- rust-analyzer: implement pattern mismatch diagnostics (but keep them disabled)
- rust-analyzer: support removing nested
dbg!()
s inremove_dbg
Rust Compiler Performance Triage
A really quiet week with almost all regressions being due to noise in benchmarks that show "bimodality" in codegen that can cause swings in performance from one change to the other. The only true performance change was a two-line change by @nnethercote to remove a redundant function call which led to a 0.3% improvement in performance across roughly 15 benchmarks.
Triage done by @rylev. Revision range: 31f858d9..8f9e09ac
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
- | - | 0 |
Regressions ❌ (secondary) |
2.0% | [1.2%, 2.8%] | 8 |
Improvements ✅ (primary) |
-0.4% | [-0.7%, -0.2%] | 7 |
Improvements ✅ (secondary) |
-1.0% | [-1.8%, -0.1%] | 31 |
All ❌✅ (primary) | -0.4% | [-0.7%, -0.2%] | 7 |
7 Regressions, 8 Improvements, 2 Mixed; 7 of them in rollups 35 artifact comparisons made in total
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
- [disposition: close] RFC - sigil-option-notation
Tracking Issues & PRs
- [disposition: merge] Implement tuple<->array convertions via
From
- [disposition: close] Tracking Issue for Mutex::unlock()
- [disposition: close] Tracking issue for
Option::contains
andResult::contains
- [disposition: merge] Remove
box_syntax
New and Updated RFCs
- No New or Updated RFCs were created this week.
Call for Testing
An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization. The following RFCs would benefit from user testing before moving forward:
- No RFCs issued a call for testing this week.
If you are a feature implementer and would like your RFC to appear on the above list, add the new call-for-testing
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
need testing.
Upcoming Events
Rusty Events between 2023-03-08 - 2023-04-05 🦀
Virtual
- 2023-03-08 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2023-03-09 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2023-03-11 | Virtual | Rust GameDev
- 2023-03-14 | Virtual (Italy) | Hinto
- 2023-03-14 | Virtual (Berlin, DE) | Berlin.rs
- 2023-03-14 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-03-14 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-14 | Virtual (Saarbrücken, DE) | Rust-Saar
- 2023-03-15 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-03-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-03-16 | Virtual (Raleigh, NC, US) | Triangle BitDevs
- 2023-03-16 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-16 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-03-21 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-21 | Virtual (Washington, DC, US) | Rust DC
- 2023-03-22 | Virtual (Richmond, VA, US) | Rustaceans RVA
- 2023-03-28 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-03-28 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2023-03-29 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-04-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-04-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-04-05 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
Europe
- 2023-03-09 | Basel, CH | Rust Basel
- 2023-03-09 | Delft, NL | Rust Nederland
- 2023-03-09 | Lyon, FR | Rust Lyon
- 2023-03-15 | Nürnberg, DE | Rust Nuremberg
- 2023-03-15 | Trondheim, NO | Rust Trondheim
- 2023-03-16 | Paris, FR | OCaml Users in Paris - OUPS
- 2023-03-17 | Stuttgart, DE | Rust Community Stuttgart
- 2023-03-28 | Zurich, CH | Rust Zurich
- 2023-03-29 | Paris, FR | Rust Paris
North America
- 2023-03-09 | Lehi, UT, US | Utah Rust
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.
Jobs
Please see the latest Who's Hiring thread on r/rust
Quote of the Week
(…) as much as i dislike the cargo-geiger concept, the name … kind of works
unsafe
is a lot like uranium. it’s just one more metal ore you can process, refine, and machine. it doesn’t combust in atmosphere, it doesn’t corrode or make weird acids. unless you go out of your way to make it dangerous you don’t even have to worry about critical masses. you can work with it pretty normally most of the timebut if you don’t know exactly what it is, what it does, and how to work with it, it will cause mysterious illnesses that only crop up long after you’ve stopped touching it
Thanks to Stephan Sokolow 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, bennyvasquez.
Email list hosting is sponsored by The Rust Foundation