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 and archives can be viewed at this-week-in-rust.org. If you find any errors in this week's issue, please submit a PR.
Updates from Rust Community
Project/Tooling Updates
- esp-rs quarterly planning: Q1 2024
- Meilisearch 1.6 - AI search & 2x faster indexing
- capnproto-rust: 0.19 - ergonomic setters and faster reflection
- hyper - 2023 in review
Observations/Thoughts
- A universal lowering strategy for control effects in Rust
- Passing nothing is surprisingly difficult
- The memory remains: Permanent memory with systemd and a Rust allocator
- Higlights of 2023 for cargo-semver-checks
- The bane of my existence: Supporting both async and sync code in Rust
- A Guide to Rust ORMs in 2024
- Semantic search powered by WASM and WebGPU
- Embassy on ESP: UART Echo
Rust Walkthroughs
- Adventures in Binary Serialisation
- Creating 2 'Simple' Allocators
- Rust macros and Lambda boilerplate
- Let's make an information display in rust Part 2: The Frontend
Miscellaneous
- Clap - subcommands for command line applications in Rust
- SurrealDB in-memory with SQL demo in Rust
- Multi-counter with embedded SurrealDB database
- Xilem 2024 plans
- Rustaceans, say goodbye to lifetime errors: announcing nolife 0.3
- Auto-generating API service using Rust, to TypeScript & Dart
- From the rust community on Reddit: Rust in Aviation
- [audio] Apollo - Rust in Production Podcast
- [audio] Prossimo with Josh Aas
Crate of the Week
This week's crate is fish, a friendly interactive shell that used to be written in C++, but was recently rewritten in Rust (though admittedly they'll have to do some work until it hits your distro's repos).
Despite a lamentable lack of suggestions, llogiq is reasonably satisfied with his choice.
Please submit your suggestions and votes for next week!
Call for Participation; projects and speakers
CFP - Projects
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.
- ZeroCopy - Use cargo-semver-checks to make sure
derive
feature doesn't change API surface 2 - Ockam -
remove_address_record
function is called two times per Address during Processor shutdown - Ockam - Command - refactor to use typed interfaces to implement commands for
kafka services
- Ockam - Library - Validate CBOR structs according to the cddl schema for
nodes/models/services
- Hyperswitch - [FEATURE]: Make cache configuration configurable at runtime
- Hyperswitch - [FEATURE]: Implement Code cov for local system using makefile
- Hyperswitch - [FEATURE]: Setup code coverage for local tests & CI
- Hyperswitch - [FEATURE]: Add domain type for client secret
- Hyperswitch - [FEATURE]: Have get_required_value to use ValidationError in OptionExt
- Fluvio - connector: fluvio-http-source, add an option to read data from a websocket
- Fluvio - MQTT Connector: Prefix auto generated Client ID to prevent connection drops
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
418 pull requests were merged in the last week
- GNU/Hurd: unconditionally use inline stack probes
rustc_codegen_ssa
: Enforcerustc::potential_query_instability
lint~const
trait and projection bounds do not imply their non-const counterparts- add assume into
NonZeroIntX::get
- add explicit
none()
value variant in check-cfg - add more information to
visit_projection_elem
- allow
~const
on associated type bounds again - avoid silencing relevant follow-up errors
- check rust lints when an unknown lint is detected
- coverage: add enums to accommodate other kinds of coverage mappings
- coverage: simplify building the coverage graph with
CoverageSuccessors
- delegation implementation: step 1
- disallow reference to
static mut
and addingstatic_mut_ref
lint - don't ICE when noting GAT bounds in
report_no_match_method_error
- don't reexport
atomic::ordering
viarustc_data_structures,
use std import - exclude well known names from showing a suggestion in check-cfg
- exhaustiveness: abort on type error
- exhaustiveness: track overlapping ranges precisely
- exhaustiveness: use an
Option
instead of allocating fictitious patterns - fix ICE when suggesting dereferencing binop operands
- fix
all_trait*
methods to return all traits available in StableMIR - fix
allow_internal_unstable
for(min_)specialization
- fix
is_global
special address handling - fix
unused_parens
issue when cast is followed LT - fix an ICE that occurs after an error has already been reported
- new flag to emit all the delayed bugs as errors (add
-Zeagerly-emit-delayed-bugs
) - making
User<T>
andUser<[T]> Send
- merge dead bb pruning and unreachable bb deduplication
- never patterns: Check bindings wrt never patterns
- pass LLVM error message back to pass wrapper
- register even erroneous impls
- remove
-Zdont-buffer-diagnostics
- stop mentioning internal lang items in
no_std
binary errors - store the segment name when resolution fails
- suggest upgrading compiler for gated features
- suggest quoting unquoted idents in attrs
- support async recursive calls (as long as they have indirection)
- taint
_
placeholder types in trait impl method signatures - unify query canonicalization mode
- remove a large amount of leb128-coded integers
- varargs support for system ABI
- stabilize
mutex_unpoison
feature - A more efficient slice comparison implementation for T: !BytewiseEq
- tune the inlinability of
unwrap
- cargo metadata: Stabilize id format as PackageIDSpec
- cargo resolver: do not panic when sorting empty summaries
- cargo: add guidance on setting homepage in manifest
- cargo: add unstable
--output-format
option tocargo rustdoc
- cargo: crates-io: set
Content-Type: application/json
only for requests with a body payload - cargo: add
rustc
style errors for manifest parsing - cargo: only inherit workspace package table if the new package is a member
- cargo: implementation of shallow libgit2 fetches behind an unstable flag
- cargo: introduce
-Zprecise-pre-release
unstable flag - cargo: strip debuginfo when debuginfo is not requested
- rustdoc-search: reuse individual types in function signatures
- clippy:
from_over_into
: suggest a correct conversion to () - clippy:
useless_asref
: check that the clone receiver is the parameter - clippy: correctly suggest
std
orcore
path depending if this is ano_std
crate - clippy: extend
useless_asref
lint onmap(clone)
- clippy: fix false positive in
PartialEq
check inunconditional_recursion
lint - clippy: fix suggestion for
map_clone
lint on types implementingCopy
- clippy: make
HirEqInterExpr::eq_block
take comments into account while checking if two blocks are equal - rust-analyzer: add
notable_trait
predicate toCompletionRelevance
- rust-analyzer: assist to merge nested if
- rust-analyzer: acknowledge
pub(crate)
imports in import suggestions - rust-analyzer: differentiate between vfs config load and file changed events
- rust-analyzer: fix
ast::Path::segments
implementation - rust-analyzer: fix incorrect parsing error on method call on range
- rust-analyzer: fix nested includes resolving from the wrong base file
- rust-analyzer: fix rust-analyzer-proc-macro-srv failing to spawn on windows
- rust-analyzer: preserve comments for extracted block expression in
'extract_function'
- rust-analyzer: remove sysroot-abi feature flag from proc-macro-test
- rust-analyzer: replace SourceRootCrates hashset output with slice for deterministic order
- rust-analyzer: resolve panic in
generate_delegate_methods
Rust Compiler Performance Triage
This week had some small regressions that did not warrant further investigation, several of which were dismissed as being noise/blips in the data. There were also a number of gains. (Don't get exicited about that 20.6% improvement, its an measurement artifact from a temporary blip in the PR that immediately preceded this week's triage.)
Triage done by @pnkfelix. Revision range: 76101eec..f9c2421a
3 Regressions, 5 Improvements, 5 Mixed; 3 of them in rollups 55 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:
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] Avoid non-local definitions in functions
Tracking Issues & PRs
- [disposition: merge] Stabilize single-field offset_of
- [disposition: merge] Undeprecate lint
unstable_features
and make use of it in the compiler - [disposition: close] Fix
non_camel_case_types
for screaming single-words
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guideline RFCs entered Final Comment Period this week.
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 2024-01-17 - 2024-02-14 🦀
Virtual
- 2024-01-17 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2024-01-23 | Virtual (Halifax, NS, CA) | Rust Halifax
- 2024-01-24 | Virtual (Berlin, DE) | WeAreDevelopers Community
- 2024-01-25 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-01-25 | Virtual (Mexico City, DF, MX) | Rust MX
- 2024-01-28 | Virtual (Wrocław, PL) | Stacja IT Wrocław
- 2024-01-30 | Virtual | Bevy Game Development
- 2024-01-30 | Virtual (Buffalo, NY, US) | Buffalo Rust User Group
- 2024-01-30 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-01-31 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2024-02-01 | Virtual + In Person (Barcelona, ES) | BcnRust
- 2024-02-01 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-02-03 | Virtual + In-person (Brussels, BE) | FOSDEM 2024
- 2024-02-03 | Virtual (Kampala, UG) | Rust Circle
- 2024-02-04 | Virtual | Rust Maven
- 2024-02-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-02-08 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-02-08 | Virtual (Nürnberg, DE) | Rust Nüremberg
- 2024-02-10 | Virtual (Wrocław, PL) | Stacja IT Wrocław
- 2024-02-13 | Virtual (Dallas, TX, US) | Dallas Rust
Europe
- 2024-01-17 | Girona, ES | Rust Girona
- 2024-01-17 | Praha / Prague, CZ | Rust Prague
- 2024-01-17 | Zurich, CH | Rust Zurich
- 2024-01-23 | Aarhus, DK | Rust Aarhus
- 2024-01-23 | Paris, FR | Rust Paris
- 2024-01-24 | Zagreb, HR | impl Zagreb for Rust
- 2024-01-25 | Augsburg, DE | Rust Meetup Augsburg
- 2024-01-25 | Vienna, AT | Rust Vienna
- 2024-02-01 | Hybrid (Barcelona, ES) | BcnRust
- 2024-02-03 | Brussels, BE | FOSDEM '24
- 2024-02-06 | Bremen, DE | Rust Meetup Bremen
- 2024-02-07 | London, UK | Rust London User Group
- 2024-02-08 | Bern, CH | Rust Bern
North America
- 2024-01-17 | Chicago, IL, US | Deep Dish Rust
- 2024-01-18 | Seattle, WA, US | Seattle Rust User Group
- 2024-01-22 | Boston, MA, US | Boston Rust Meetup
- 2024-01-24 | Austin, TX, US | Rust ATX
- 2024-01-27-28 | Calgary, AB, CA | Rust Calgary
- 2024-01-30 | Cambridge, MA, US | Boston Rust Meetup
- 2024-02-07 | Brookline, MA, US | Boston Rust Meetup
- 2024-02-12 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2024-02-13 | New York, NY, US | Rust NYC
- 2024-02-13 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
Oceania
- 2024-02-06 | Perth, WA, AU | Perth Rust Meetup 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.
Jobs
Please see the latest Who's Hiring thread on r/rust
Quote of the Week
Congrats to the #Rustlang and #Rust-for-#Linux community: the #LinuxKernel now contains the first useful thing built using Rust!
– Thorsten Leemhuis on FOSStodon
As with the crate of the week, this week saw a total lack of suggestions, so llogiq would like to offer you this piece of good news from the Linux side of things.
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