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? Tweet us at @ThisWeekInRust 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
Project/Tooling Updates
- rust-analyzer changelog #143
- Slint UI crate weekly updates
- This week in Databend #56: A Modern Cloud Data Warehouse for Everyone
- What's new in axum 0.6.0-rc.1
- HexoSynth Modular Synthesizer in Rust - Devlog #10: Alpha-1 Release
- Fornjot (code-first CAD in Rust) - Weekly Release - 2022-W34
Observations/Thoughts
Rust Walkthroughs
- Tauri + Async Rust Process
- Writing a container in Rust
- Experimentally compiling PHP code to Rust - Ryan Chandler
- STM32F4 Embedded Rust at the HAL: GPIO Interrupts
- [video] Rust Traits vs C++ Concepts
- [video] Writing Procedural Macros
- [video] Get under the hood of Rust Language with Assembly!!
- [video] Scoped threads in Rust 1.63
- [video] 1Password Developer Fireside Chat: Demystifying Atomics
Crate of the Week
This week's crate is sass-embedded, a library to communicate with Embedded Dart Sass.
Thanks to Ahab 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 didn't 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 - Add syntax highlighting to examples in ockam clap command help using syntect
- Ockam - Add examples section to ockam tcp-inlet create command's help
- Ockam - Make ockam node delete --all --force command more forceful
- Mirrord - Consider using mold linker
- Mirrord - mirrod-layer and mirrord bin are being built twice when running cargo +nightly build
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
411 pull requests were merged in the last week
- mitigate stale data reads on SGX platform
- support 128-bit atomics on all aarch64 targets
rustc_metadata: deduplicate strings to prevent multiple copies in rmeta/query cache blow file size- make NOP dyn casts not require anything about the vtable
- implied bounds: explicitly state which types are assumed to be wf
- never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn)
- do not allow
Dropimpl on foreign fundamental types - don't derive
PartialEq::ne - lazily decode SourceFile from metadata
- make
must_not_suspendlint see through references when drop tracking is enabled - mention
as_mutalongsideas_refin borrowck error message - point at a type parameter shadowing another type
- recover keywords in trait bounds
- reenable disabled early syntax gates as future-incompatibility lints
- improved diagnostic for function defined with
def,fun,func, orfunctioninstead offn - suggest
fniffun,func,functionordefis used to define a function - suggest
once_cell::Lazyfor non-const statics - suggest adding a reference to a trait assoc item
- suggest adding an array length if possible
- suggest the right help message for
as_ref UnreachableProp: preserve unreachable branches for multiple targets- kind-less
SessionDiagnosticderive - convert diagnostics in parser/expr to
SessionDiagnostic - migrate "invalid variable declaration" errors to
SessionDiagnostic - migrate emoji identifier diagnostics to
SessionDiagnosticinrustc_interface - migrate lint reports in
typeck::check_unusedtoLintDiagnostic - migrate more
rustc_borrowckdiagnostics toSessionDiagnostic - migrate
rustc_ast_passesdiagnostics toSessionDiagnosticand translatable messages (first part) - migrate typeck's
usedexpected symbol diagnostic toSessionDiagnostic - migrations for
rustc_expandtranscribe.rs - migrate some
rustc_borrowckdiagnostic - miri: breaking
posix_memalignprecondition is not UB - miri: improve information sharing across SB diagnostics
- miri: add very basic Android support
- remove manual implementations of
HashStableforhir::Exprandhir::Ty - shrink
ast::Attribute - box the
MacCallin various types - use
AttrVecmore - add
IpDisplayBufferhelper struct - rework
Ipv6Addr::is_globalto check for global reachability rather than global scope - make
slice::reverseconst - refactor iteration logic in the
FlattenandFlatMapiterators - futures: fix incorrect termination of
select_with_strategystreams - cargo: fix file locking being not supported on Android raising an error
- cargo: improve error message for an array value in the manifest
- cargo: improve error message for wrong target names
- rustdoc: merge source code pages HTML elements together v2
- rustdoc: count deref and non-deref as same set of used methods
- rustdoc: strategic boxing to reduce the size of ItemKind and Type
- rustfmt: Unicode comment align
- clippy: add
unused_peekablelint - clippy: add
manual_empty_string_creationslint - clippy: add new lint
positional_named_format_parameters - clippy: don't lint on match pattern-binding in
question_mark - clippy: enhance
needless_borrowto consider trait implementations - clippy: fix
non_ascii_literalin tests - clippy: fix
to_string_in_format_argsfalse positive - clippy: fix false positives of
needless_match - clippy: lint
collapsible_str_replace - clippy: more lint pass merges
- clippy: refactor
FormatArgsExpn - clippy: rework
only_used_in_recursionand move it back tocomplexity - clippy:
transmute_undefined_reprfix - clippy: check for
if-some-or-ok-else-none-or-err - clippy: Do not lint
needless_collectif the target code is inside a loop - clippy: suggest
map_orincase_sensitive_file_extension_comparisons - clippy:
unwrap_usedandexpect_used: trigger on uses of their_errvariants - rust-analyzer: consider bounds on inherent impl in method resolution
- rust-analyzer: implement
IntoFuturetype inference - rust-analyzer: implement lsp extension for cancelling running flychecks
- rust-analyzer: log rustfmt parsing errors as warnings
- rust-analyzer: pop an error notification when flycheck can't be restarted
- rust-analyzer: add a setting for keyword hover popups
- rust-analyzer: add an assist for inlining all type alias uses
- rust-analyzer: generate static method using
Self::assoc()syntax - rust-analyzer: improved
inline_callto replaceSelf - rust-analyzer: run test mod from anywhere in parent file
- rust-analyzer: make trait assoc items become inactive due to cfg
- rust-analyzer: fix panics on GATs involving const generics
- rust-analyzer: escape keywords used as names in earlier editions
- rust-analyzer: record completion filtering
- rust-analyzer: resolve associated types of bare
dyntypes - rust-analyzer: resolve path
Selfalone in value namespace - tidy: check fluent files for style
Rust Compiler Performance Triage
Overall some really impressive wins this week. Note in particular
PR #100209, "Lazily
decode SourceFile from metadata" (which improved 75 primary benchmark
scenarios and 158 secondary scenarios) and
PR #98655 "Don't derive
PartialEq::ne", which improved 65 primary scenarios and 27 secondary
scenarios). There were a few cases that pnkfelix explicitly decided not
to mark as triaged; see report for more details there.
Also pnkfelix wonders if there is a recent slight-upward trend on max-rss
for the past week, see the summary graph
Triage done by @pnkfelix. Revision range: 14a459bf..4a24f08b
Summary:
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions ❌ (primary) |
0.6% | [0.4%, 0.8%] | 27 |
| Regressions ❌ (secondary) |
0.4% | [0.2%, 0.6%] | 9 |
| Improvements ✅ (primary) |
-1.7% | [-20.1%, -0.3%] | 91 |
| Improvements ✅ (secondary) |
-3.6% | [-18.7%, -0.3%] | 160 |
| All ❌✅ (primary) | -1.2% | [-20.1%, 0.8%] | 118 |
3 Regressions, 4 Improvements, 4 Mixed; 3 of them in rollups 43 artifact comparisons made in total
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.
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] Register wf obligation before normalizing in wfcheck
- [disposition: merge] Partially stabilize
bound_as_refby stabilizingBound::as_ref - [disposition: merge] Document NonZeroXxx layout guarantees
- [disposition: merge] Strengthen invalid_value lint to forbid uninit primitives, adjust docs to say that's UB
- [disposition: merge] Make forward compatibility lint deprecated_cfg_attr_crate_type_name deny by default
New and Updated RFCs
- [new] RFC: Statics in patterns
Upcoming Events
Rusty Events between 2022-08-24 - 2022-09-21 🦀
Virtual
- 2022-08-24 | Virtual (Beijing, CN) | WebAssembly and Rust Meetup (Rustlang)
- 2022-08-24 | Virtual + Wellington, NZ | Rust Wellington
- 2022-08-25 | Virtual (Karlsruhe, DE) | The Karlsruhe Functional Programmers Meetup Group
- 2022-08-27 | Virtual (Bangalore, IN) | Polkadot India
- 2022-08-30 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2022-08-30 | Virtual + Dallas, TX, US | Dallas Rust
- 2022-09-01 | Virtual (PDT Timezone) | Conf42
- 2022-09-01 | Virtual | Google Open Source Live
- 2022-09-02 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-09-03 | Virtual (Bangalore, IN) | Polkadot India
- 2022-09-03 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-09-04 | Virtual (Seattle, WA, US) | Seattle Rust Meetup
- 2022-09-06 | Virtual (Beijing, CN) | WebAssembly and Rust Meetup (Rustlang)
- 2022-09-06 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2022-09-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-09-10 | Virtual | Rust GameDev
- 2022-09-10 | Virtual (Bangalore, IN) | Polkadot India
- 2022-09-12 | Virtual + Dublin, IE | Linux Plumbers Conference
- 2022-09-13 | Virtual + Dallas, TX, US | Dallas Rust
- 2022-09-13 | Virtual (Rostock, DE) | Altow Academy
- 2022-09-14 | Virtual (Malaysia)| Golang Malaysia
- 2022-09-15 | Virtual (Columbus, OH, US) | GDG Columbus
- 2022-09-20 | Virtual (Washington, DC, US) | Rust DC
- 2022-09-21 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Europe
- 2022-08-25 | Copenhagen, DK | Copenhagen Rust group
- 2022-08-25 | Stockholm, SE | StockholmCpp
- 2022-08-30 | Utrecht, NL | Rust Nederland
- 2022-09-12 | Dublin, IE + Virtual | Linux Plumbers Conference
North America
- 2022-08-23 | Toronto, ON, CA | Rust Toronto
- 2022-08-25 | Ciudad de México, MX | Rust MX
- 2022-08-25 | Lehi, UT, US | Utah Rust
- 2022-08-31 | New York, NY, US | Rust NYC
Oceania
- 2022-08-24 | Wellington, NZ + Virtual | Rust Wellington
- 2022-08-26 | Melbourne, VIC, AU | Rust Melbourne
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
A fast executing language that crashes all the time is like a supercar… that crashes all the time.
Thanks to scottmcm 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.
Email list hosting is sponsored by The Rust Foundation