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
- IntelliJ Rust Changelog #186
- rust-analyzer changelog #164
- This Week in Fyrox
- clap v4.1
- Fornjot (code-first CAD in Rust) - Weekly Release
- Release of sphrs 0.2.0, a spherical harmonics library
- Rails developers write some Rust: a review of Axum 0.6
- Rust should own its debugger experience
- The Hidden Control Flow — Some Insights on an Async Cancellation Problem in Rust
- Fallible - The Lost Sibling of Result and Option
- Folding arguments into the macro
- Zero To Production book review
- We Need Type Information, Not Stable ABI
- Comparison of web frameworks written in Java, nodejs and Rust
- This year I tried solving AoC using Rust, here are my impressions coming from Python!
- Create a Rust worker | Wasm Workers Server
- Displaying Images on ESP32 with Rust!
- Rust FFI and bindgen: Integrating Embedded C Code in Rust
- Finding Nice MD5s Using Rust
- 2D game base with Bevy and LDtk (linked wasm)
- Song search in Rust using OpenAI
- Build a ray tracer, pt. 1 - 2D Image
- Building an out-of-tree Rust Kernel Module Part Two
- Using Rust to write a Data Pipeline. Thoughts. Musings.
- [video] C++ vs Rust: which is faster?
- [video] Everything You Wanted to Know About Rust Unit Testing (and then some more)
- [video] Introduction to rust operators for Kubernetes
- [DE] Rust-Framework: Turmoil testet verteilte Systeme
- [DE] Rust: bis zu 2500 Projekte durch Bibliothek Hyper für DoS verwundbar
- [DE] Ferris Talk #13: Rust-Web-APIs und Mocking mit Axum
- [DE] Open-Source-Browser: Google öffnet Chromium für Rust
Crate of the Week
This week's crate is syntactic-for, a syntactic "for" loop Rust macro.
Thanks to Tor Hovland for the 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 - GitHub CI: use global default shell in documentation.yml workflow
- Ockam - Modify clap command ockam start to set the node attribute's default value using attributes
- Ockam - Add optional --identity argument to clap command secure-channel-listener create and modify its API handler
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
458 pull requests were merged in the last week
#[do_not_recommend]implementation (RFC #2397)
- LSDA Take
ttype_indexinto account when taking unwind action
- add checks for the signature of the
- add log-backtrace option to show backtraces along with logging
- add note when
- adding a hint on iterator type errors
- allow codegen to unsize
- change flags with a fixed default value from
consider_impl_candidatein experimental solver
- collect and emit proper backtraces for
- consider return type when giving various method suggestions
- const closures
- deprioritize fulfillment errors that come from expansions
- detect out of bounds range pattern value
- detect struct literal needing parentheses
- disable "split dwarf inlining" by default
- emit a hint for bad call return types due to generic arguments
- emit a single error for contiguous sequences of unknown tokens
- emit only one nbsp error per file
- enable atomic cas for bpf targets
- exclude formatting commit from blame
- feed a bunch of queries instead of tracking fields on TyCtxt
- fix ICE formatting
unused_braceson generic const expr macro call
- fix bad import suggestion with nested
- fix help docs for -Zallow-features
- fix invalid files array re-creation in rustdoc-gui tester
- fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311
- fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang)
- fix misleading "add dyn keyword before derive macro" suggestion
- improve fluent error messages
struct/enum constructorinstead of
fn item, mention that it should be called on type mismatch
- mark ZST as FFI-safe if all its fields are PhantomData
- move autoderef to
- new trait solver: rebase impl substs for gats correctly
- cargo: nightly Fix CVE-2022-46176: Missing SSH host key validation
- note predicate span on
- only suggest adding type param if path being resolved was a type
- prefer non-
[type error]candidates during selection
- provide help on closures capturing self causing borrow checker errors
- recover from where clauses placed before tuple struct bodies
- remove unnecessary lseek syscall when using
- render missing generics suggestion verbosely
- report fulfillment errors in new trait solver
- specialize impl of
- stop probing for statx unless necessary
is_emptyfor collections when casting to
- suggest making private tuple struct field public
- suggestion for type mismatch when we need a u8 but the programmer wrote a char literal
- tweak E0277
- tweak E0599 and
- support eager subdiagnostics again
- libcore: make result of
- leak amplification for
peek_mut()to ensure BinaryHeap's invariant is always met
- futures: fix panic when
Unfoldsink return an error
- futures: fix
cargo metadatasupports artifact dependencies
- cargo: support
rustflagsin profiles in config file
TryFromwhen truncation possible
expl_impl_clone_on_copy: ignore packed structs with type/const params
needless_return: remove all semicolons on suggestion
unused_self: don't trigger if the method body contains
- clippy: allow implementing
- clippy: move
- rust-analyzer: add basic tooltips to adjustment hints
- rust-analyzer: assist: desugar doc-comment
- rust-analyzer: comment out disabled code
- rust-analyzer: derive 'Hash'
- rust-analyzer: make
unlinked_filediagnostic quickfixes work for inline modules
- rust-analyzer: fix panicking Option unwraping in match arm analysis
- rust-analyzer: fix ty should query impls in nearest block
- rust-analyzer: check orpat in missing match
- rust-analyzer: don't generate
PartialOrdmethods body when types don't match
- rust-analyzer: make inlay hint location links work for more types
- rust-analyzer: interior-mutable types should be
- rust-analyzer: remove hover inlay tooltips, replace them with location links
- rust-analyzer: remove recursive
- rust-analyzer: split out hir-def attribute handling parts into hir-expand
- rust-analyzer: unconditionally enable location links in inlay hints again
Rust Compiler Performance Triage
Nearly all flagged regressions are likely noise, except one rollup with minor impact on diesel that we will follow up on. We had a broad (albeit small) win from #106294.
Triage done by @pnkfelix. Revision range: 0442fbab..1f72129f
|All ❌✅ (primary)||0.3%||[-0.6%, 1.7%]||46|
4 Regressions, 3 Improvements, 3 Mixed; 4 of them in rollups 50 artifact comparisons made in total
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.
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: close] use implied bounds from impl header when comparing trait and impl methods
- [disposition: merge] rustdoc: change trait bound formatting"
- [disposition: merge] Make ExitStatus implement Default
- [disposition: merge] Allow fmt::Arguments::as_str() to return more Some(_).
New and Updated RFCs
- [new] RFC:
CARGO_TARGET_DIRECTORIES, parent of all target directories
- [new] RFC: (Re)standardise error code documentation
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
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
Rusty Events between 2023-01-18 - 2023-02-15 🦀
- 2023-01-18 | Virtual (San Francisco, CA, US; São Paulo, BR; New York, NY US) | Microsoft Reactor San Francisco and Microsoft Reactor São Paulo and Microsoft Reactor New York
- 2023-01-18 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-01-19 | Virtual (Redmond, WA, US; San Francisco, CA, US; New York, NY, US; Stockholm, SE) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco and Microsoft Reactor Stockholm
- 2023-01-19 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-01-23 | Virtual (Durham, NC, US) | Triangle Rust
- 2023-01-23 | Virtual (Linz, AT) | Rust Linz
- 2023-01-23 | Virtual (New York, NY, US; San Francisco, CA, US) | Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-01-24 | Virtual (Redmond, WA, US; New York, NY, US) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-01-25 | Virtual (Redmond, WA, US; San Francisco, CA, US) | Microsoft Reactor Redmond | Microsoft Reactor San Francisco
- 2023-01-26 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2023-01-26 | Virtual (Redmond, WA, US; San Francisco, CA, US; New York, NY, US; Stockholm, SE) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco and Microsoft Reactor Stockholm
- 2023-01-30 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-01-31 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-01-31 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-01-31 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-02-01 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-02-01 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-02-01 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-02-06 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-02-07 | Virtual (Beijing, CN) | WebAssembly and Rust Meetup (Rustlang)
- 2023-02-07 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-02-07 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Reactor New York and Microsoft Reactor San Francisco
- 2023-02-08 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Rector New York and Microsoft Reactor San Francisco
- 2023-02-13 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Rector New York and Microsoft Reactor San Francisco
- 2023-02-14 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-02-14 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Rector New York and Microsoft Reactor San Francisco
- 2023-02-14 | Virtual (Saarbrücken, DE) | Rust-Saar
- 2023-02-15 | Virtual (Redmond, WA, US; New York, NY, US; San Francisco, CA, US) | Microsoft Reactor Redmond and Microsoft Rector New York and Microsoft Reactor San Francisco
- 2023-02-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-01-15 | Tokyo, JP | Tokyo Rust Meetup
- 2023-02-01 | Kyoto, JP | Kansai Rust
- 2023-01-20 | Stuttgart, DE | Rust Community Stuttgart
- 2023-01-25 | Paris, FR | Rust Paris
- 2023-01-26 | Copenhagen, DK | Copenhagen Rust Meetup Group
- 2023-02-02 | Hamburg, DE | Rust Meetup Hamburg
- 2023-02-02 | Lyon, FR | Rust Lyon
- 2023-01-20 | New York, NY, US | Blockchain Center
- 2023-01-26 | 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.
Please see the latest Who's Hiring thread on r/rust
Quote of the Week
Common arguments against Rust's safety guarantees:
- The library you're binding to can have a segfault in it.
- RAM can physically fail, causing dangling pointers.
- The computer the Rust program is running on can be hit by a meteorite.
- Alan Turing can come back from the dead and tell everyone that he actually made up computer science and none of it is real, thus invalidating every program ever made, including all Rust programs.
– Ironmask on the phoronix forums
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