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
Official
- Language team advisors
- Welcome Tyler Mandry to the Rust language team!
- Governance Reform RFC Announcement
Project/Tooling Updates
- rust-analyzer Changelog #169
- Rust now available for Real-Time Operating System and Hypervisor PikeOS
- Announcing Relm4 v0.5
- Fornjot (code-first CAD in Rust) - Weekly Release - Accidental Side-Effect
Observations/Thoughts
- Why is building a UI in Rust so hard?
- Lightweight, Predictable Async Send Bounds
- Return type notation (send bounds, part 2)
- Faking Algebraic Effects and Handlers With Traits: A Rust Design Pattern
- winnow = toml_edit + combine + nom
- Battle Of The Backends: Rust vs. Go vs. C# vs. Kotlin - inovex GmbH
- The Bull Case for Rust on the Web
- I love building a startup in Rust. I wouldn't pick it again.
- Rust development for the Raspberry PI on Apple Silicon
Rust Walkthroughs
- Learn how to build and deploy a down detector Telegram bot in Rust
- Compile Time Correctness: Type State
- Build a casual side scroller with Rust
- True Observer Pattern with Unsubscribe mechanism using Rust
- Refactoring in Rust: Abstraction with the Newtype Pattern
- Rust to WebAssembly the hard way
- STM32F4 Embedded Rust at the PAC: System Clock Configuration
- Implement base64 encoding using Rust - (Part 1) Base64 for non-unicode characters
- Build a Apache Kafka Producer/Consumer Application in Rust
- Learning Rust by Building a To-Do App
- A Nibble of Quadtrees in Rust
- Embedded Rust on ESP32C3 Board, a Hands-on Quickstart Guide
- How to make a Text Adventure game in Rust - X - More Attributes
- Nothing in Rust
- [ES] Aprendiendo Rust 🦀️ II. Programming a guessing game
- [video] Speed up your Rust code with Rayon
- [video] Making Custom Asset Types: Platformer In Bevy #4
- Implementing a Binary Tree in Rust
- Run WebAssembly from your Rust Program
Research
Miscellaneous
- Learn Rust With JetBrains IDEs
- Rust in Rhymes II explainer
- [audio] Lodestone with Wilbur Zhang, Peter Jiang, and Kevin Huang
- Rust Nation UK 2023
Crate of the Week
This week's crate is Darkbird, a high-concurrency real-time in-memory database.
Thanks to DanyalMh 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.
- miri - Get Miri working on ARM again
- man-in-the-middle-proxy - Add Custom headers requests
- Ockam - Create clap command to delete a TCP Outlet on a node
- Ockam - Create clap command to delete a TCP Inlet on a node
- Ockam - Add a Github Action to avoid conflicts in TypeTag ids
- Ockam - Remove the disable/enable_check_credential arguments from ockam tcp-outlet create
- Ockam - Remove the disable/enable_check_credential arguments from ockam tcp-inlet create
- Ockam - Update ockam project addon configure influx-db clap command to ockam project addon configure influxdb
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
396 pull requests were merged in the last week
- wasm: register the
relaxed-simd
target feature - enable
#[thread_local]
on armv6k-nintendo-3ds - add sanitizer support for modern iOS platforms
- add
kernel-address
sanitizer support for freestanding targets - add an unstable
#[rustc_coinductive]
attribute - added another error to be processed in fallback
- check that built-in callable types validate their output type is
Sized
(in new solver) - implement partial support for non-lifetime binders
- deny non-lifetime bound vars in
for<..> ||
closure binders - don't call
with_reveal_all_normalized
in const-eval whenparam_env
has inference vars in it - don't eagerly convert principal to string
- don't recover lifetimes/labels containing emojis as character literals
- don't suggest
#[doc(hidden)]
trait methods with matching return type - make codegen choose whether to emit overflow checks
- fix RPITITs in default trait methods (by assuming projection predicates in param-env)
- fix json reexports of different items with same name
- improve the suggestion on future not awaited
- unexpected trait bound not satisfied in HRTB and Associated Type
- make
dyn*
's value backend type a pointer - more accurate spans for arg removal suggestion
- enable CopyProp
- enable instcombine for mutable reborrows
- factor query arena allocation out from query caches
- avoid accessing HIR when it can be avoided
- optimize
LazyLock
size - optimize
mk_region
- prevent some attributes from being merged with others on reexports
- remove save-analysis
- rework
min_choice
algorithm of member constraints - suggest fix for misplaced generic params on fn item
- suggest the correct array length on mismatch
- tighter spans for bad inherent
impl
self types - type-directed probing for inherent associated types
- use
is_str
instead of string kind comparison - use
target
instead ofmachine
for mir interpreter integer handling - use covariance on type relations of field projection types if possible
- use derive attributes for uninteresting traversals
- use id-based thread parking on SOLID
- use restricted Damerau-Levenshtein distance for diagnostics
- use semantic equality for const param type equality assertion
- constify
RangeBounds
,RangeX::contains
andRangeX::is_empty
(where applicable) - implement more methods for
vec_deque::IntoIter
- use custom implementation of
read_buf
in Read for &'a FileDesc - futures: add
AbortHandle::is_aborted()
- cargo: enhance help texts of position args
- only include stable lints in
rustdoc::all
group - rustdoc: perform name resolver cleanups
- rustdoc: correctly handle links starting with whitespace
- rustdoc: cleanup doc link extraction
- rustfmt: use correct span for struct generics
- bindgen: add support for enums with the wrapped static functions feature
- clippy: add
let_underscore_untyped
lint - clippy: add
question_mark_used
lint - clippy: add the
transmute_int_to_non_zero
lint - clippy: add
significant_drop_tightening
lint - clippy:
significant_drop_tightening
: evaluate the return expression of a block - clippy:
significant_drop_tightening
: ignore inexpensive statements - clippy: fix false positives for
extra_unused_type_parameters
- clippy: stop
bytes_nth
from suggesting code that does not compile - clippy: stop
doc_markdown
requiring backticks on links to external websites - clippy:
box_default
: don't omit the type of the removed trait object - clippy:
manual_let_else
: do not suggest semantically different replacements - clippy:
manual_let_else
: let/else is not divergent by default - clippy:
never_loop
Fix false positive with labeled blocks - clippy:
uninlined_format_args
: do not inline argument with generic parameters - clippy: change
unusual_byte_groupings
to only require byte groupings of equal size - clippy: do not base
map_entry
lint suggestion on expanded code - clippy: fix
needless_return
incorrect suggestion when returning if sequence - clippy: ignore synthetic type parameters for
extra_unused_type_parameters
- clippy: liberate late-bound regions rather than erasing them in
needless_pass_by_value
- rust-analyzer: add v7 metadata support to rust-analyzer
- rust-analyzer: don't assume VSCode internal commands in the server
- rust-analyzer: support UTF-32 position encoding
- rust-analyzer: adjust binding mode inlay hints to render better with @ patterns
- rust-analyzer: bring back hovering call parens for return type info
- rust-analyzer: don't expand macros in the same expansion tree after overflow
- rust-analyzer: don't trigger postfix completion in
if
block which has anelse
block - rust-analyzer: search raw identifiers without prefix
- rust-analyzer: trigger call info for more completions of signature having things
Rust Compiler Performance Triage
Overall a fairly positive week, with few noise-related regressions or improvements and many benchmarks showing significant improvements. The one large regression is limited to documentation builds and has at least a partial fix already planned.
Other wins this week include an average improvement of around 1% in maximum memory usage of optimized builds, and a 2% average reduction in compiled binary sizes. These are fairly significant wins for these metrics.
Triage done by @simulacrum. Revision range: 9bb6e60..3fee48c1
3 Regressions, 3 Improvements, 3 Mixed; 2 of them in rollups 45 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] rustdoc: search by macro when query ends with
!
- [disposition: merge] Stabilize rustdoc
--test-run-directory
- [disposition: merge] Treat
str
as containing[u8]
for auto trait purposes
New and Updated RFCs
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-02-22 - 2023-03-22 🦀
Virtual
- 2023-02-23 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2023-02-23 | Virtual (Kassel, DE) | Java User Group Hessen
- 2023-02-23 | Virtual (México City, MX) | Rust MX
- 2023-02-24 | Virtual (Tunis, TN) | Rust Meetup Tunisia
- 2023-02-28 | Virtual (Berlin, DE) | Open Tech School Berlin
- 2023-02-28 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-02-28 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-02-28 | Virtual (Munich, DE) | Rust Munich
- 2023-03-01 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-03-02 | Virtual (Linz, AT) | Rust Linz
- 2023-03-07 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-03-08 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2023-03-11 | Virtual | Rust GameDev
- 2023-03-14 | Virtual (Berlin, DE) | Berlin.rs
- 2023-03-15 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-03-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-03-21 | Virtual (Washington, DC, US) | Rust DC
Asia
- 2023-03-04 | Kyoto, JP | Kansai Rust
Europe
- 2023-02-23 | Bordeaux, FR | DedoTalk
- 2023-02-23 | Copenhagen, DK | Copenhagen Rust Community
- 2023-02-23 | Vienna, AT | Rust Vienna
- 2023-02-28 | Munich, DE + Virtual | Rust Munich
- 2023-02-28 | Nijmegen, NL | Rust Nederland
- 2023-03-01 | Cologne, DE | Rust Cologne
- 2023-03-02 | Barcelona, ES | BcnRust
- 2023-03-02 | Wrocław, PL | Rust Wrocław
- 2023-03-07 | Bratislava, SK | Bratislava Rust Meetup Group
- 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
North America
- 2023-02-23 | Mountain View, CA, US | Mountain View Rust Study Group
- 2023-03-01 | Austin, TX, US | Rust ATX
- 2023-03-09 | Lehi, UT, US | Utah Rust
Oceania
- 2023-02-23 | Brisbane, QLD, AU | Rust Brisbane
- 2023-02-28 | Canberra, ACT, AU | Canberra Rust User Group
- 2023-03-01 | Sydney, NSW, AU | Rust Sydney
South America
- 2023-02-22 | Montevideo, UY | Rust Meetup Uruguay
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
It’s enjoyable to write Rust, which is maybe kind of weird to say, but it’s just the language is fantastic. It’s fun. You feel like a magician, and that never happens in other languages.
– Parker Timmerman cited in a TechnologyReview article
Thanks to robin 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