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
Official
Project/Tooling Updates
- hyper v1
- Rocket v0.5: Stable, Async, Sentinels, Streams, SSE, Forms, WebSockets, & So Much More
- GlueSQL v0.15 - Python, Redis and CSV support
- Meilisearch releases v1.5 - faster indexing, on-demand snapshots, and Puffin reports
- Nutype v0.4.0 - newtype with constraints
- Announcing open-ai-safe: a typesafe OpenAI API Rust client
Observations/Thoughts
- A JVM in Rust part 8 - Retrospective
- Rust 1.74.0: All 45 changes in 19 minutes!
- Fun with lexical analysis and Rust
- Wasmtime and Cranelift in 2023
- Signals vs. Servers
- Function interposition in Rust with upgrayedd
- A close encounter with false sharing
- Edge IoT with Rust on ESP: MQTT Publisher
- Checking semver in the presence of doc(hidden) items
- Push Ifs Up And Fors Down
- Building Segmented Logs in Rust: From Theory to Production!
- Writing an async runtime generic library
- Ferrostar: Building a Cross-Platform Navigation SDK in Rust (Part 1)
Rust Walkthroughs
- This is how I made the runtime this website runs on!
- [video] Tokenizing and parsing a programming language in Rust, by Adam Chalmers
Miscellaneous
- Building a Better Foundation for Rocket's Future
- [audio] Rust Digger with Gabor Szabo
- [video] Making the (partial) Rust BitTorrent client more reasonable
- [video] Rust Release Train 1.74
- [video] EuroRust 2023
Crate of the Week
This week's crate is rocket, an opinionated web framework that aims to be really ergonomic while still being fast.
Thanks to David Mason 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.
- Hyperswitch - [REFACTOR]: [Zen] MCA metadata validation
- Hyperswitch - [FEATURE] Standardize state field in billing and shipping address
- Hyperswitch - [BUG]: MCA metadata deserialization failures should be 4xx
- Hyperswitch - [Feature]: [NMI] Sync with Hyperswitch Reference
- Hyperswitch - [Feature]: [Zen] Sync with Hyperswitch Reference
- Ockam -
Cargo.toml
feature management should allow building individual crates with default feature set - Ockam - Improve error handling of multiple
ockam tcp-outlet create
calls - Ockam - Library - Slim down the
NodeManagerWorker
fornode / tcp
- Ockam - Library - Slim down the
NodeManagerWorker
fornode / credentials
- Ockam - Command - refactor to use typed interfaces to implement commands for
secure channel
andsecure channel listener
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
369 pull requests were merged in the last week
- add arm64e-apple-ios & arm64e-apple-darwin targets
- remove asmjs
- add -Z
llvm_module_flag
- add richer structure for Stable MIR Projections
- adjust frame IP in backtraces relative to image base for SGX target
- always point at index span on index obligation failure
- avoid iterating over hashmaps in astconv
- build pre-coroutine-transform coroutine body on error
- ensure sanity of all computed ABIs
- fix insertion of statements to be executed along return edge in inlining
- handle attempts to have multiple
cfg
d tail expressions - ignore but do not assume region obligations from unifying headers in negative coherence
- ignore implied bounds with placeholders
- lint pinned
#[must_use]
pointers (in particular,Box<T>
whereT
is#[must_use]
) inunused_must_use
- make
LayoutError::Cycle
carryErrorGuaranteed
- make regionck care about placeholders in outlives components
- more detail when expecting expression but encountering bad macro argument
- new solver normalization improvements
- patterns: don't ICE when encountering a raw str slice
- recover
dyn
andimpl
afterfor<...>
- remove incorrect transformation from RemoveZsts
- remove legacy bitcode defaults from all Apple specs
- better handle type errors involving
Self
literals - add some additional warnings for duplicated diagnostic items
- suggest dereferencing the LHS for binops such as
&T == T
- on resolve error of
[rest..]
, suggest[rest @ ..]
- try to use approximate placeholder regions when outputting an AscribeUserType error in borrowck
- when a local binding shadows a fn, point at fn def in call failure
- when encountering
struct
fn call literal with private fields, suggest all builders - when using existing fn as module, don't claim it doesn't exist
- interpret: simplify handling of shifts by no longer trying to handle signed and unsigned shift amounts in the same branch
- custom MIR: Support cleanup blocks
- emit smir
- add CoroutineWitness to covered types in smir
- miri: cargo-miri: when verbose, print where the sysroot is being built
- miri: get rid of our last uses of
set_var
- miri: implement all 16 AVX compare operators for 128-bit SIMD vectors
- miri: reallocarray shim linux/freebsd support proposal
- reenable effects in libcore
- if available use a Child's pidfd for kill/wait
- fix rounding issue with exponents in
fmt
- add
Seek::seek_relative
- impl more traits for
ptr::Alignment,
add mask method - feat: implement
DoubleEndedSearcher
forCharArray[Ref]Searcher
- hashbrown: avoid using unstable
ptr::invalid_mut
- futures: fillBuf: don't poll a second time on EOF
- futures: remove redundant
impl Unpin
- cargo-credential-1password: add missing
--account
argument toop signin
command - cargo: add color output for
cargo --list
- cargo resolver: Don't do git fetches when updating workspace members
- cargo resolver: Prefer MSRV, rather than ignore incompatible
- cargo: fix
--check-cfg
invocations with zero features - cargo: fix error message for duplicate links
- cargo: handle
$message_type
in JSON diagnostics - cargo: if the only path is a loop then counted as the shortest path
- cargo: ignore
changing_spec_relearns_crate_types
on windows-gnu - cargo: only filter out target if its in the package root
- remove unneeded
unknown
variable andSymbol
creation when iterating over items in rustdoc rendering - rustdoc-search: optimize unifyFunctionTypes
- rustdoc-search: simplify the checkTypes fast path
- rustfix: fix insert at beginning
- clippy:
impl_trait_in_params
: avoid ICE when function withimpl Trait
type has no parameters - clippy:
needless_return_with_question_mark
ignore let-else - clippy: change
if_same_then_else
to be astyle
lint - clippy: extend
maybe_misused_cfg
lint overcfg(test)
- clippy:
manual_memcpy
reduce indexing suggestions when array length is equal to loop range - clippy: implement new lint
iter_over_hash_type
- clippy: improve maybe misused cfg
- clippy: lint
flatten()
underlines_filter_map_ok
- clippy: new lint
clippy::join_absolute_paths
- clippy: teach
eager_or_lazy
about panicky arithmetic operations - clippy: verify
Borrow<T>
semantics for types that implement Hash,Borrow<str>
andBorrow<[u8]>
- rust-analyzer: diagnose incorrect unsafety for trait impls
- rust-analyzer: diagnose missing assoc items in trait impls
- rust-analyzer: diagnose some orphan trait impl cases
- rust-analyzer: fix
PathSegment
grammar - rust-analyzer: fix builtin line! expansion
- rust-analyzer: diagnose everything in nested items, not just def diagnostics
- rust-analyzer: handle default constant values in
trait_impl_missing_assoc_item
diagnostic
Rust Compiler Performance Triage
Pretty quiet week, with only a small number of statistically significant changes landing.
Triage done by @simulacrum. Revision range: 173b6e68..4f3da90
1 Regressions, 1 Improvements, 1 Mixed; 0 of them in rollups 60 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
- No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
- [disposition: merge] [style edition 2024] Combine all delimited exprs as last argument
- [disposition: merge] Tracking Issue for
ptr::addr_eq
- [disposition: merge] Stabilize C string literals
- [disposition: merge] Tracking Issue for mutex_unpoison
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 2023-11-22 - 2023-12-20 🦀
Virtual
- 2023-11-23 | Virtual (Edmonton, AB, CA) | Edmonton R User Group - Yegrug
- 2023-11-28 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-11-28 | Virtual (Europe / Africa) | Rust for Lunch
- 2023-11-29 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-11-30 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-11-30 | Virtual (Dublin, IE) | Rust Dublin
- 2023-12-01 | Virtual (Cardiff, UK)| Rust and C++ Cardiff
- 2023-12-02 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2023-12-05 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-12-05 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-12-06 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-12-12 | Virtual | Mainmatter
- 2023-12-12 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-12-14 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-12-18 | Virtual (Munich, DE) | Rust Munich
- 2023-12-20 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Europe
- 2023-11-23 | Biel/Bienne, CH | Rust Bern
- 2023-11-28 | London, UK | Rust London User Group
- 2023-11-30 | Brussels, BE | Belgium Rust user group
- 2023-11-30 | Copenhagen, DK | Copenhagen Rust Community
- 2023-11-30 | Vienna, AT | Rust Vienna
- 2023-11-30 | Zurich, CH| Rust Zurich
- 2023-12-06 | Cologne, DE | Rust Cologne
- 2023-12-07 | Aarhus, DK | Rust Aarhus
- 2023-12-07 | Lille, FR | Rust Lille
- 2023-12-14 | Augsburg, DE | Rust - Modern Systems Programming in Leipzig
- 2023-12-18 | Munich, DE + Virtual | Rust Munich
- 2023-12-19 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
North America
- 2023-11-22 | Austin, TX, US | Rust ATX
- 2023-11-28 | Pasadena, CA, US | Pasadena Thursday Go / Rust
- 2023-11-29 | Chicago, IL, US | Deep Dish Rust
- 2023-12-12 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
- 2023-12-19 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2023-11-28 | Canberra, ACT, AU | Rust Canberra
- 2023-12-05 | Aukland, NZ | Rust AKL
- 2023-12-11 | Perth, WA, AU | Rust Perth 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
If you require it, measure it. That's the simple answer. Everything else is guesswork.
Thanks to Michael Bryan 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