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
- rust-analyzer changelog #187
- Youki v0.1.0 has been released for use with Kubernetes and more
- Build Zellij WebAssembly (Rust) plugins for your Terminal
- Slint 1.1 Released with additional Royalty-Free License
- Exograph: Declarative GraphQL backends with a Rust-powered runtime
- Nutype v0.3
Observations/Thoughts
- Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
- Escaping Macrophages
- Code coverage in Rust
- [video] Verus - Verified Rust for low-level systems code by Andrea Lattuada
- [audio] Daily with Kwindla Hultman Kramer :: Rustacean Station
- [audio] Fish Folk with Erlend Sogge Heggen :: Rustacean Station
Rust Walkthroughs
- Serde Errors When Deserializing Untagged Enums Are Bad - But Easy to Make Better
- Blowing up my compile times for dubious benefits
- Walk-Through: Prefix Ranges in Rust, a Surprisingly Deep Dive
- ESP32 Embedded Rust at the HAL: Remote Control Peripheral
- Auto-Generating & Validating OpenAPI Docs in Rust: A Streamlined Approach with Utoipa and Schemathesis
- [video] Writing a Rust-based ring buffer
- [video] Supercharge your I/O in Rust with io_uring
- [video] Graph Traversal with Breadth-First Search in Rust
- [video] Nine Rules for Writing Python Extensions in Rust | PyData Seattle 2023
Research
- Friend or Foe Inside? Exploring In-Process Isolation to Maintain Memory Safety for Unsafe Rust
- Agile Development of Linux Schedulers with Ekiben
Miscellaneous
Crate of the Week
This week's crate is Parsel, an easy to use parser generator.
Thanks to jacg 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.
- RustQuant - Issue 56: Implementing Logistic Regression: weights matrix becomes singular.
- RustQuant - Issue 30: Error handling for the library.
- RustQuant - Issue 22: Pricing model calibration module.
- RustQuant - Issue 14: Add/improve documentation (esp. math related docs).
- RustQuant - Issue 57: Increase test coverage (chore).
- Ockam - Add API endpoint to retrieve the project's version
- Ockam - Validate the credential before storing it
- Ockam - Update CLI documentation for
lease
commands - Send File - create hotspot on Linux operating system
- Send File - Get device storage information (used disk size and total memory)
- Send File - Create hotspot on Windows Operating system
- Send File - Use Tauri store plugin to persist app data
- mirrord - Alert user when running on OpenShift
- mirrord - Add integration test for listening on the same port again after closing
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
400 pull requests were merged in the last week
- syntactically accept
become
expressions (explicit tail calls experiment) hir
: AddBecome
expression kind (explicit tail calls experiment)- add esp-idf missing targets
- accept
ReStatic
for RPITIT - account for sealed traits in privacy and trait bound errors
- add support for NetBSD/aarch64-be (big-endian arm64)
- always register sized obligation for argument
- better error for non const
PartialEq
call generated bymatch
- don't ICE on unnormalized
struct
tail in layout computation - don't structurally resolve during method ambiguity in probe
- don't substitute a GAT that has mismatched generics in
OpaqueTypeCollector
- expose
compiler-builtins-weak-intrinsics
feature for-Zbuild-std
- fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty
- fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty
- add cfg diagnostic for unresolved import error
- inline before merging cgus
- liberate bound vars properly when suggesting missing async-fn-in-trait
- make
closure_saved_names_of_captured_variables
a query - make queries traceable again
- merge
BorrowKind::Unique
intoBorrowKind::Mut
- sort the errors from arguments checking so that suggestions are handled properly
- suggest correct signature on missing fn returning RPITIT/AFIT
- support Apple tvOS in libstd
- test the cargo args generated by bootstrap.py
- use ErrorGuaranteed instead of booleans in
rustc_builtin_macros
- various impl trait in assoc tys cleanups
- warn on unused
offset_of!()
result - fix: generalize types before generating built-in
Normalize
clauses - support
FnPtr
trait - miri: mmap/munmap/mremamp shims
Default
: Always inline primitive data types- add
alloc::rc::UniqueRc
- make {
Arc
,Rc
,Weak
}::ptr_eq
ignore pointer metadata - alter
Display
forIpv6Addr
for IPv4-compatible addresses - fix windows
Socket::connect_timeout
overflow - specialize
StepBy<Range<{integer}>>
- implement
PartialOrd
forVec
s over different allocators - implement
Sync
formpsc::Sender
- cargo: Support
cargo Cargo.toml
- cargo: add
.toml
file extension restriction for-Zconfig-include
- cargo: allow embedded manifests in all commands
- rustdoc: partially fix invalid files creation
- rustdoc: fix union fields display
- rustdoc: handle assoc const equalities in cross-crate impl-Trait-in-arg-pos
- rustdoc: render the body of associated types before the where-clause
- rustfmt: handling of numbered markdown lists
- rustfmt: implement
let-else
formatting (finally!) - clippy:
borrow_as_ptr
: Ignore temporaries - clippy:
format_push_string
: look throughmatch
andif
expressions - clippy:
get_unwrap
: include a borrow in the suggestion if argument is not an integer literal - clippy:
items_after_test_module
: Ignore in-proc-macros items - clippy:
ptr_arg
: Don't lint when return type usesCow
's lifetime - clippy:
single_match
: don't lint if block contains comments - clippy:
type_repetition_in_bounds
: respect MSRV for combining bounds - clippy: allow safety comment above attributes
- clippy: avoid linting
extra_unused_type_parameters
on procedural macros - clippy: check if
if
conditions always evaluate to true innever_loop
- clippy: don't lint
excessive_precision
on inf - clippy: don't lint
iter_nth_zero
innext
- clippy: lint
mem_forget
if any fields areDrop
- rust-analyzer: feature: assist delegate impl
- rust-analyzer: fix some unsizing problems in mir
- rust-analyzer: skip mutable diagnostics on synthetic bindings
- rust-analyzer: support manual impl of fn traits in mir interpreter
- rust-analyzer: support more intrinsics in mir interpreter
Rust Compiler Performance Triage
Relatively quiet week outside of a large win on one incremental benchmark in a regression test (i.e., not real world code). Bimodality in a number of benchmarks continues to be an issue.
Triage done by @simulacrum. Revision range: b9d608c9..b5e51db
5 Regressions, 6 Improvements, 3 Mixed; 5 of them in rollups
44 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: close] Tracking issue for std::default::default()
- [disposition: merge] Create
unnecessary_send_constraint
lint for&(dyn ... + Send)
- [disposition: merge] Change default panic handler message format.
- [disposition: close] MSVC and rustc disagree on minimum stack alignment on x86 Windows
- [disposition: merge] style-guide: Add chapter about formatting for nightly-only syntax
- [disposition: merge] rustdoc: Allow whitespace as path separator like double colon
- [disposition: merge] Add
internal_features
lint - [disposition: merge] Don't require associated types with Self: Sized bounds in
dyn Trait
objects - [disposition: merge] Return Ok on kill if process has already exited
New and Updated RFCs
- No New or Updated RFCs were created this week.
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:
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-06-28 - 2023-07-26 🦀
Virtual
- 2023-06-28 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-06-28 | Virtual (Chicago, IL, US) | Chicago Healthcare Cloud Technology Community
- 2023-06-29 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2023-07-01 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2023-07-04 | Virtual (Berlin, DE) | Berline.rs / OpenTechSchool Berlin
- 2023-07-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-07-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-07-05 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2023-07-06 | Virtual (Ciudad de México, MX) | Rust MX
- 2023-07-11 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-07-13 - 2023-07-14 | Virtual | Scientific Computing in Rust
- 2023-07-13 | Virtual (Edinburgh, UK) | Rust Edinburgh
- 2023-07-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-07-20 | Virtual (Tehran, IR) | Iran Rust Meetup
Asia
- 2023-06-29 | Seoul, KR | T-RUST meetup
Europe
- 2023-06-28 | Bratislava, SK | Bratislava Rust Meetup Group
- 2023-06-29 | Augsburg, DE | Rust Meetup Augsburg
- 2023-06-29 | Copenhagen, DK | Copenhagen Rust Community
- 2023-06-29 | Vienna, AT | Rust Vienna
- 2023-07-01 | Basel, CH | Rust Basel
- 2023-07-03 | Zurich, CH | Rust Zurich
- 2023-07-05 | Lyon, FR | Rust Lyon
- 2023-07-11 | Breda, NL | Rust Nederland
- 2023-07-11 | Virtual | Mainmatter
- 2023-07-13 | Reading, UK | Reading Rust Workshop
North America
- 2023-06-21 | Somerville, MA, US | Boston Rust Meetup
- 2023-06-22 | New York, NY, US | Rust NYC
- 2023-06-24 | San Jose, CA, US | Rust Breakfast & Learn
- 2023-06-28 | Cambridge, MA, US | Boston Rust Meetup
- 2023-06-29 | Mountain View, CA, US | Mountain View Rust Meetup
- 2023-07-01 | San Jose, CA, US | Rust Breakfast & Learn
- 2023-07-07 | Chicago, IL, US | Deep Dish Rust
- 2023-07-12 | Austin, TX, US | Rust ATX
- 2023-07-12 | Waterloo, ON, CA | Rust KW
- 2023-07-13 | Seattle, WA, US | Seattle Rust User Group Meetup
- 2023-07-18 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2023-07-11 | Christchurch, NZ | Christchurch Rust Meetup Group
- 2023-07-11 | Melbourne, VIC, AU | Rust Melbourne
South America
- 2023-07-04 | Medellín, CO | Rust Medellín
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 a compiler not a Jedi, don't expect it to read minds.
Thanks to Nishant for the self-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