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
Foundation
Project/Tooling Updates
- Announcing axum 0.6.0
- Redox OS 0.8.0
- Releasing Yew 0.20
- rust-analyzer changelog #157
- This Week in Fyrox
- Fornjot (code-first CAD in Rust) - Weekly Release
- Unimock 0.4
- Slint 0.3.2 release
- Extism: make all software programmable
Observations/Thoughts
- Rust to assembly: Arrays, Tuples, Box, and Option handling
- Improving async Rust codegen
- rustdoc: Recent UI and UX changes in generated documentation 2
- Rust Foundation in 2023-25
- Follow-up to Foundation post
- WebAssembly: TinyGo vs Rust vs AssemblyScript
- Falsehoods programmers believe about undefined behavior
- [video] Learning Rust the wrong way - Ólafur Waage - NDC TechTown 2022
- [video] OS Development - One Year with Rust - by Bernhard Kauer
- [video] Embedded Rust on ESP32 - Juraj Michálek
- [audio] Leptos with Greg Johnston
- [audio] Kanal with Khashayar Fereidani
Rust Walkthroughs
- Threads and messages with Rust and WebAssembly
- Migrating from warp to axum
- Measuring the overhead of HashMaps in Rust
- Building an API in Rust with Rocket.rs and Diesel.rs (Clean Architecture)
- Avoiding Benchmarking Pitfalls with black_box in Rust
- Embedded Rust & Embassy: UART Serial Communication
- Rust GUI and GTK calc
- Fearless concurrency: multithreaded unzip
- [video] Typesafe Router state with Axum 0.6 release
Miscellaneous
Crate of the Week
This week's crate is code-radio-cli, a command line interface for listening to freeCodeCamp's Code Radio music stream.
Thanks to 魏杰 for the 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.
- pest - RFC: Make white-space handling less confusing / more consistent with the introduction of an "adjacent selector"
- pest - two issues for the pest's website if anyone's into Wasm
- site - migrate from stdweb to wasm-bindgen and websys
- site - integrate a web version of pest_debugger
This week we also have a few non-rust-specific needs from your friends at This Week in Rust! Check them out:
- this-week-in-rust - Add a dark theme
- this-week-in-rust - Add anchors for headers
- this-week-in-rust - Add a search
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
389 pull requests were merged in the last week
- add powerpc64-ibm-aix as Tier-3 target
- stabilize native library modifier
verbatim
- use clang for the UEFI targets
- optimize field ordering by grouping m×2ⁿ-sized fields with equivalently aligned ones
- allow opaque types in trait impl headers and rely on coherence to reject unsound cases
- allow power10-vector feature in PowerPC
- branch
Clause
fromPredicate
- enable
fuzzy_provenance_casts
lint in liballoc and libstd - enable profiler in dist-riscv64-linux
- lint: do not warn unused parens around higher-ranked function pointers
- llvm-wrapper adapt for LLVM API change
- make
deref_into_dyn_supertrait
lint the impl and not the usage - pass
InferCtxt
toDropRangeVisitor
so we can resolve vars - pretty-print generators with their
generator_kind
- privacy: fix more (potential) issues with effective visibilities
- properly handle
Pin<&mut dyn* Trait>
receiver in codegen - resolve: don't use constructor def ids in the map for field names
- separate lifetime ident from lifetime resolution in HIR
- stricter alignment enforcement for ScalarPair and Vector
- suggest
.clone()
orref binding
on E0382 - miri: fix handling of spurious accesses during retag
- miri: make
no_std
work on Windows - miri: track local frames incrementally during execution
- miri: use
.wasm
extension when building for wasm in cargo-miri - use an IndexVec to cache queries with index-like key
- fix perf regression by correctly matching keywords
rustc_metadata
: switch module children decoding to an iterator- codegen_gcc: fix
simd_bitmask
- codegen_gcc: fix the argument order for some AVX-512 intrinsics
- don't build
compiler_builtins
with-C panic=abort
- manually implement PartialEq for
Option<T>
and specialize non-nullable types - stop peeling the last iteration of the loop in
Vec::resize_with
- constify remaining
Layout
methods - mark
sys_common::once::generic::Once::new
const-stable - add slice methods for indexing via an array of indices
- futures:
stream::size_hint
for mpsc channels - futures: custom
Debug
implementations formpsc
- futures: remove
Debug
constraint foroneshot
types - portable SIMD: avoid a scalar loop in
Simd::from_slice
- regex: speed up replacen loop
rustc_codegen_ssa
: write.dwp
in a streaming fashion- cargo: add error message for
cargo fix
on an empty repo - cargo: add suggestions when
cargo add
multiple packages - cargo: store the sparse+ prefix in the SourceId for sparse registries
- rustdoc: improve popover focus handling JS
- bindgen: add
--wrap-unsafe-ops
option - bindgen: add
ParseCallbacks::process_comment
- bindgen: deprecate Rust targets lower or equal than
1.30
- bindgen: escape method fragments that happen to be rust keywords
- bindgen: remove traits that have a single implementation
- clippy: add
clippy_utils::msrv::Msrv
to keep track of the current MSRV - clippy: add allow-mixed-uninlined-format-args config
- clippy: fix
unnecessary_to_owned
false positive - clippy: fix
redundant_closure_for_method_calls
suggestion - clippy: fix
unnecessary_lazy_eval
when type has significant drop - clippy: lint unnecessary safety comments
- clippy: re-enable
uninlined_format_args
on multilineformat!
- clippy: remove blank lines when
needless_return
returns no value - rust-analyzer: add
deriveHelper
tosemanticTokenTypes
section of package.json - rust-analyzer: add assist to generate trait impl's
- rust-analyzer: adds hover hint to ".." in record pattern
- rust-analyzer: check tail expressions more precisely in
extract_function
- rust-analyzer: filter unnecessary completions after colon
- rust-analyzer: handle empty
checkOnSave/target
values - rust-analyzer: handle sysroot config in detached-files workspaces
- rust-analyzer: tuple to named struct inside macros
- rust-analyzer: hir-expand: fix
compile_error!
expansion not unquoting strings - rust-analyzer: improve goto declaration
- rust-analyzer: properly implement Drop for JodGroupChild
- rust-analyzer: suppress "Implement default members" inside contained items
- cargo-bisect-rustc: --start without --end defaults
end
to be today - cc-rs: refine CUDA support
Rust Compiler Performance Triage
A relatively quiet week for performance, with the notable exception of "Avoid
GenFuture
shim when compiling async constructs #104321"
which brought sizeable wins on a number of stress test benchmarks. It probably
won't be of huge benefit to most codebases, but should provide smaller wins to
folks with large amounts of async-generated futures.
Triage done by @simulacrum. Revision range: a78c9bee..8a09420a
3 Regressions, 3 Improvements, 6 Mixed; 2 of them in rollups 43 artifact comparisons made in total
See the full report for details.
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:
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] RFC:
c"…"
string literals
Tracking Issues & PRs
- [disposition: merge] Remove const eval limit and implement an exponential backoff lint instead
- [disposition: merge] Windows: make
Command
prefer non-verbatim paths
New and Updated RFCs
- No New or Updated RFCs were created this week.
Upcoming Events
Rusty Events between 2022-11-30 - 2022-12-28 🦀
Virtual
- 2022-11-30 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2022-11-30 | Virtual (Munich, DE) | Rust Munich
- 2022-12-01 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2022-12-01 | Virtual (Lehi, UT, US) | Utah Rust
- 2022-12-01 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2022-12-06 | Virtual (Berlin, DE) | Berlin.rs
- 2022-12-06 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2022-12-07 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-12-07 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-12-08 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-12-08 | Virtual (San Francisco, CA, US) | Data + AI Online Meetup
- 2022-12-10 | Virtual | Rust GameDev
- 2022-12-13 | Virtual (Dallas, TX, US) | Dallas Rust
- 2022-12-13 | Virtual (Rostock, DE) | Altow Academy
- 2022-12-13 | Virtual (Saarbrücken, DE) | Rust-Saar
- 2022-12-14 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2022-12-14 | Virtual (México City, MX) | Rust MX
- 2022-12-15 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-12-20 | Virtual (Berlin, DE) | Berlin.rs
- 2022-12-20 | Virtual (Washington, DC, US) | Rust DC
- 2022-12-21 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2022-12-27 | Virtual (Dallas, TX, US) | Dallas Rust
Europe
- 2022-11-30 | Amsterdam, NL | Rust Nederland
- 2022-11-30 | Lille, FR | Rust Lille
- 2022-11-30 | Milan, IT | Rust Language Milano
- 2022-11-30 | Munich, DE + Virtual | Rust Munich
- 2022-11-30 | Paris, FR | Rust Paris
- 2022-12-01 | Edinburgh, UK | Rust Edinburgh
- 2022-12-01 | Wrocław, PL | Rust Wrocław
- 2022-12-06 | London, UK | Rust London User Group
- 2022-12-07 | Zurich, CH | Rust Zurich
- 2022-12-12 | Enschede, NL | Dutch Rust Meetup
- 2022-12-15 | Stuttgart, DE | Rust Community Stuttgart
North America
- 2022-12-01 | Lehi, UT, US + Virtual | Utah Rust
- 2022-12-08 | Columbus, OH, US | Columbus Rust Society
- 2022-12-20 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2022-12-09 | 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
After many years of writing bugs, and then discovering Rust, I learned to appreciate explicitness in code, and hope you eventually will too.
– Artem Borisovskiy on rust-users
Thanks to Árpád Goretity 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