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.
Updates from Rust Community
Official
Foundation
Newsletters
Project/Tooling Updates
- Announcing error-stack
- Rust Explorer: Rust playground with the top 10k crates
- Clap 3.2: Last Call Before 4.0
- C2Rust is Back
- rust-analyzer changelog #133
- Progress report on rustc_codegen_cranelift (June 2022)
- rustc_codegen_gcc: Progress Report #12
- IntelliJ Rust Changelog #172
- Fornjot (code-first CAD in Rust) - Weekly Dev Log - 2022-W23
- Slint UI crate weekly updates
- This week in Databend #46: A Modern Cloud Data Warehouse for Everyone
- This week in Fluvio #36: The programmable streaming platform
Observations/Thoughts
- Into the Future with IntoFuture - Improving Rust Async Ergonomics
- The Rust borrow checker just got (a little bit) smarter
- Async cancellation: a case study of pub-sub in mini-redis
- Local Async Executors and Why They Should be the Default
- Rust advocacy at a medium-sized startup
- Carcinisation of mirrord (or: why we use Rust)
- Everything Is Broken: Shipping rust-minidump at Mozilla – Part 1
- How to Make Rust Leak Memory (Also: How to Make It Stop)
- [video] Post-Crust of Rust Q&A
- [audio] Rust Foundation with Rebecca Rumbul
- [audio] This Week in Rust - Issue 444
Rust Walkthroughs
- Caches In Rust
- Flavors of enums with Rust bindgen
- Implementing strace in Rust
- Async Cancellation II: Time and Signals
- Tidy up your Rust imports with a prelude.rs
- Hitchikers guide to Lunatic TCP Servers in 🦀
- Building a web application with Rust and WebAssembly
- Unwrap a value with the question mark operator in Rust
- [video] Async I/O in Depth: State Machines, Event Loops and Non-Blocking I/O System Calls in Rust (Part 2)
- [video] Crust of Rust: Send, Sync, and their implementors
- [video] [series] Introduction to Yew.rs
Research
Miscellaneous
Crate of the Week
This week's crate is dxf-rs, a library to parse AutoCAD files.
Thanks to cosj for the 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
368 pull requests were merged in the last week
- add support for emitting functions with
coldcc
to LLVM - allow unstable items to be re-exported unstably without requiring the feature be enabled
- don't suggest adding
let
in certainif
conditions - fix ICEs from zsts within unsized types with non-zero offsets
- fix precise field capture of univariant enums
- never regard macro rules with
compile_error!
invocations as unused - use more targeted suggestion when confusing i8 with std::i8
ValuePairs::PolyTraitRefs
should be called "trait"s in type error diagnostics- use precise spans for recursive const evaluation
- suggest escaping
box
as identifier - suggest to swap a struct and a trait in trait impls
- suggest using
iter()
orinto_iter()
forVec
- tidy up miscellaneous bounds suggestions
- cleanup bound variable handling
- do not introduce bindings for types and consts in higher-ranked trait bounds
- folding revamp
- make
Encodable
andEncoder
infallible - re-use the type op instead of calling the
implied_outlives_bounds
query directly - remove redundant calls to
reserve
inimpl Write for VecDeque
- remove unnecessary
to_string
andString::new
- miri: make scheduler preemptive
- stabilize
$$
in Rust 1.63.0 - stabilize the
bundle
native library modifier - stabilize
explicit_generic_args_with_impl_trait
- stabilize
const_intrinsic_copy
- stabilize scoped threads
- allow
ptr_from_addr_cast
to fail - add the
Provider
api tocore::any
BTreeSet
: avoid intermediate sorting when collecting sorted iteratorsimpl Read
andWrite
forVecDeque<u8>
- change
Direction::{is_forward,is_backward}
functions into constants - fix infinite recursion in x86_64 memcmp if SSE2 is not present
- fix
Termination
impl panic on closed stderr - hashbrown: add
Extend<&'a (K, V)> for HashMap<K, V, S, A>
- hashbrown: editing
do_alloc
for reducing LLVM IR - codegen_gcc: feature/more simd
- clippy: fix
iter_overeager_cloned
false positive - clippy: fix some
#[expect]
lint interaction - clippy: fix
derive_partial_eq_without_eq
- clippy: check const context
- rustfmt: dedup
imports_granularity = "Item"
(#4737) - rust-analyzer: more precise proc-macro errors
- rust-analyzer: restart server automatically on settings changes
- rust-analyzer: add proc macro ABI for rustc 1.63
- rust-analyzer: on assoc item name hover, render trait decl docs
- rust-analyzer: add label to loop
- rust-analyzer: fix inline variable produce mismatched type
- rust-analyzer: don't respond to cancelled requests when retrying them
- rustup: Visual Studio: add the English language pack
- rustup: Visual Studio: let the user choose install method
- rustup: improve handling of Visual Studio errors
Rust Compiler Performance Triage
A mixed week. I suppose it is best to focus on the fact we made some big improvements to a large number of primary benchmarks, at the cost of some smaller regressions to a smaller number of primary benchmarks.
Triage done by @pnkfelix. Revision range: bb55bd44..edab34ab
Summary:
mean | max | count | |
---|---|---|---|
Regressions 😿 (primary) |
0.6% | 1.6% | 35 |
Regressions 😿 (secondary) |
2.1% | 8.1% | 23 |
Improvements 🎉 (primary) |
-0.8% | -3.5% | 72 |
Improvements 🎉 (secondary) |
-0.8% | -2.9% | 62 |
All 😿🎉 (primary) | -0.4% | -3.5% | 107 |
4 Regressions, 3 Improvements, 5 Mixed; 4 of them in rollups 47 artifact comparisons made in total
Full report here.
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.
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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] Document Rust's stance on /proc/self/mem
- [disposition: merge] lub: don't bail out due to empty binders
- [disposition: merge] Impl Termination for Infallible and then make the Result impls of Termination into a blanket
- [disposition: merge] Partial stabilization of "nonzero_checked_ops".
- [disposition: close] Tracking issue for RFC 2514, "Union initialization and Drop"
- [disposition: merge] Stabilize
Path::try_exists()
and improve doc - [disposition: merge]
impl<T: AsRawFd> AsRawFd for {Arc,Box}<T>
- [disposition: merge] os str capacity documentation
New and Updated RFCs
- [new] Cargo and Rustup safe file discovery.
- [new] Mention infer_static_outlives_requirements removal
- [updated] Mention de-approval of
cfg(target = "...")
Upcoming Events
Rusty Events between 2022-06-15 - 2022-07-13 🦀
Virtual
- 2022-06-15 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-06-15 | Vancouver, BC, CA | Vancouver Rust
- 2022-06-17 | Virtual | Rust Iran Meetup
- 2022-06-20 | Köln, DE | Rust Cologne
- 2022-06-21 | Berlin, DE | Berline.rs
- 2022-06-21 | Washington, DC, US | Rust DC
- 2022-06-28 | Dallas, TX, US | Dallas Rust
- 2022-06-29 | Stuttgart, DE | Rust Community Stuttgart
- 2022-06-30 | Linz, AT | Rust Linz
- 2022-07-05 | Austin, TX, US | WebAssembly and WasmEdge
- 2022-07-05 | Beijing, CN | WebAssembly and Rust Meetup (Rustlang)
- 2022-07-05 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-07-06 | Indianapolis, IN, US | Indy Rust
- 2022-07-07 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-07-09 | Virtual | Rust Game Dev
- 2022-07-13 | Boulder, CO, US | Boulder Elixir and Rust
North America
- 2022-06-15 | Austin, TX, US | Rust ATX
- 2022-06-21 | San Francisco, CA, US | San Francisco Rust Study Group
- 2022-06-29 | Austin, TX, US | ATX Rustaceans
- 2022-07-13 | Atlanta, GA, US | Rust Atlanta
Europe
- 2022-06-16 | Bristol City, UK | Rust Bristol
- 2022-06-21 | Oslo, NO | Rust Oslo
- 2022-06-22 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2022-06-23 | Wrocław, PL | Rust Wrocław
- 2022-06-28 | London, UK | Rust London User Group
Oceania
- 2022-06-17 | Melbourne, VIC, AU | Rust Melbourne
- 2022-06-23 | Brisbane, QLD, AU | Rust Brisbane
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
Audiotool
Kollider
Disney
Stockly
Stellate
Enso
Spire Global
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Because lower-level software has more operational constraints than higher-level software (e.g. it typically cannot tolerate a runtime or memory management via garbage collection), developing a memory safe language suitable for systems software is particularly challenging. The Rust language has met that challenge, however, and is an excellent candidate for replacing C in many systems applications.
We plan to invest in the tools that allow systems engineers to move their software to Rust. This means investing in improving package management, compilers, and Foreign Function Interface (FFI) generators. In many cases this will include providing interfaces compatible with existing widely-used components to enable transition. With these tools, adoption of a memory safe alternative will scale much faster without replication of efforts.
– The White House Open Source Software Mobilization Plan, multiple authors (PDF link)
Thanks to Brian Kung 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