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
Project/Tooling Updates
- rust-analyzer changelog #178
regex
1.8.0 release notes- Fornjot (code-first CAD in Rust) - Weekly Release - Where We've Been, Where We're Going
- pavex, a new Rust web framework - Progress report #3
- r3bl_tui v0.3.3 TUI engine released
- Autometrics 0.4: Spot commits that introduce errors or slow down your application
- Rust Search Extension v1.11.0 has been released
- [video] Rust Releases! Rust 1.69.0
Observations/Thoughts
- Is Rust a worthy contender for web development?
- Bringing runtime checks to compile time in Rust
- Can the Rust type system prevent deadlocks?
- Why is Rust programming language so popular?
- [video] Embeddable Rust
Rust Walkthroughs
- Guide to Rust procedural macros
- Rust + Embedded: A Development Power Duo
- A blog article and project demonstrating GitHub actions in Rust
- Foresterre's place | Using the todo! macro to prototype your API in Rust
- Generics and Const Generics in Rust
- Writing an NES emulator: Part 1 - The 6502 CPU
- Integrating the Rust Axum Framework with Cloudflare Workers
- ESP32 Embedded Rust at the HAL: GPIO Button Controlled Blinking
- GBA From Scratch: A Basic Executable
- [video] A Practical Introduction to Declarative Macros in Rust
Miscellaneous
- Bringing Memory Safety to sudo and su
- Console #154 - An Interview with Giuliano of Sniffnet - Rust app to easily monitor network traffic
- [DE] Programmiersprache: Rust Foundation überarbeitet Trademark-Entwurf
Crate of the Week
This week's crate is system-deps, a crate that will compile your pkg-config-based dependencies for you.
Thanks to Aleksey Kladov 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 - add
upsert
endpoint tocards_info
table - Hyperswitch - add a route that will invalidate cache
- Hyperswitch - Implement
ApiKeyInterface
forMockDb
- Hyperswitch - Implement
ConfigInterface
forMockDb
- velo - Add ability to switch canvas background - Issue #22 - StaffEngineer/velo - GitHub 3
- velo - Hex color widget - Issue #58 - StaffEngineer/velo - GitHub 1
- ockam - Update CLI documentation for
secure-channel-listener
commands 1 - ockam - Update CLI documentation for
identity
commands - ockam - Refactor auto-reconnect replacer 1
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
- add support for the
x86_64h-apple-darwin
target - support AIX-style archive type
assume
value ranges intransmute
rustc_metadata
: RemoveSpan
fromModChild
- add suggestion to use closure argument instead of a capture on borrowck error
- deduplicate unreachable blocks, for real this time
- delay a good path bug on drop for
TypeErrCtxt
(instead of a regular delayed bug) - ensure
mir_drops_elaborated_and_const_checked
when requiring codegen - fix ICE for transmutability in candidate assembly
- fix lint regression in
non_upper_case_globals
- fix printing native CPU on cross-compiled compiler
- make
impl Debug for Span
not panic on not having session globals - make
non_upper_case_globals
lint not report trait impls - make sysroot finding compatible with multiarch systems
- missing blanket impl trait not public
- normalize types and consts in MIR opts
- panic instead of truncating if the incremental on-disk cache is too big
- report allocation errors as panics
- report more detailed reason why
Index
impl is not satisfied - set commit information environment variables when building tools
- substitute missing trait items suggestion correctly
- suggest using integration tests for test crate using own proc-macro
- track if EvalCtxt has been tainted, make sure it can't be used to make query responses after
- miri: add minimum alignment support for loongarch64
- miri: disable preemption in tokio tests again
- miri: remove a test that wasn't carrying its weight
- don't transmute
&List<GenericArg> <-> &List<Ty>
- enable flatten-format-args by default
- rm const traits in libcore
- remove the size of locals heuristic in MIR inlining
- don't allocate on SimplifyCfg/Locals/Const on every MIR pass
- allow to feed a value in another query's cache and remove
WithOptConstParam
- implement
StableHasher::write_u128
viawrite_u64
- in
LexicalResolver
, don't construct graph unless necessary - turn on ConstDebugInfo pass
- run various queries from other queries instead of explicitly in phases
- add
intrinsics::transmute_unchecked
- add
offset_of!
macro (RFC #3308) - limit read size in
File::read_to_end
loop - specialize some
io::Read
andio::Write
methods forVecDeque<u8>
and&[u8]
- implement
Neg
for signed non-zero integers - hashbrown: change key to return
&K
rather than&Q
- hashbrown: relax the trait bounds of
HashSet::raw_table{,_mut}
- regex: fix prefix literal matching bug
- portable-simd: lane → element for
core::simd::Simd
- portable-simd: implement dynamic byte-swizzle prototype
- cargo: add the
Win32_System_Console
feature since it is used - cargo: allow named debuginfo options in Cargo.toml
- cargo: better error message when getting an empty dep table
- cargo: fix: allow win/mac credential managers to build on all platforms
- cargo: improve error message for empty dep
- clippy:
arithmetic_side_effects
cache symbols - clippy:
arithmetic_side_effects
detect integer methods that can introduce side effects - clippy: add
items_after_test_module
lint - clippy: add size-parameter to
unecessary_box_returns
- clippy: bugfix: ignore
impl Trait
(s) @let_underscore_untyped
- clippy: check for
..
pattern inredundant_pattern_matching
- clippy: don't suggest
suboptimal_flops
unavailable in nostd - clippy: fix
#[allow(clippy::enum_variant_names)]
directly on variants - clippy: fix false positive in
allow_attributes
- clippy: ignore
manual_slice_size_calculation
in code from macro expansions - clippy: ignore
shadow
warns in code from macro expansions - clippy: make
len_zero
lint not spanning over parenthesis - clippy: new lint: detect
if
expressions with simple boolean assignments to the same target - clippy: suppress the triggering of some lints in derived structures
- rust-analyzer: add
#[doc(alias(..))]
-based field and function completions - rust-analyzer: don't wavy-underline the whole for loop
- rust-analyzer:
editor.parameterHints.enabled
not always being respected - rust-analyzer: deduplicate passed workspaces by top level cargo workspace they belong to
- rust-analyzer: fix need-mut large span in closures and a false positive
- rust-analyzer: fix panic in const eval and parameter destructing
- rust-analyzer: fix pat fragment handling in 2021 edition
- rust-analyzer: mbe: fix token conversion for doc comments
- rust-analyzer: remove extra argument "rustc"
- rust-analyzer: report remaining macro errors in assoc item collection
- rust-analyzer: resolve
$crate
in derive paths - rust-analyzer: register obligations during path inference
- rust-analyzer: simple fix for
make::impl_trait
- rust-analyzer: specify
--pre-release
when publishing vsce nightly
Rust Compiler Performance Triage
A week mostly dominated by noise, in particular a persistent bimodality in keccak and cranelift-codegen. No significant changes outside of that, a relatively equal mix of regressions and improvements. Most of the bimodality has been removed in the full report as it's just noise.
Triage done by @simulacrum. Revision range: 74864fa..fdeef3e
3 Regressions, 6 Improvements, 5 Mixed; 1 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
Tracking Issues & PRs
- [disposition: merge] Use fulfillment to check Drop impl compatibility
- [disposition: merge] Only check outlives goals on impl compared to trait
- [disposition: merge] rustdoc: restructure type search engine to pick-and-use IDs
- [disposition: merge] Stabilize raw-dylib, link_ordinal, import_name_type and -Cdlltool
- [disposition: merge] Add deployment-target --print flag for Apple targets
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-04-26 - 2023-05-24 🦀
Virtual
- 2023-04-26 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-04-27 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2023-04-27 | Copenhagen, DK | Copenhagen Rust Community
- 2023-04-29 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2023-05-02 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2023-05-03 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-05-09 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-05-11 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2023-05-13 | Virtual | Rust GameDev
- 2023-05-16 | Virtual (Washington, DC, US) | Rust DC
- 2023-05-17 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-05-17 | Virtual (Vancouver, BC, CA) | Vancouver Rust
Asia
- 2023-05-06 | Kyoto, JP | Kansai Rust
- Rust Talk: Vec, arrays, and slices
Europe
- 2023-04-26 | London, UK | Rust London User Group
- 2023-04-27 | Bordeaux, FR | DedoTalk
- 2023-04-27 | Vienna, AT | Rust Vienna
- 2023-05-02 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2023-05-10 | Amsterdam, NL | RustNL
- 2023-05-19 | Stuttgart, DE | Rust Community Stuttgart
North America
- 2023-04-29 | Durham, NC, US | Triangle Rust
- 2023-05-03 | Austin, TX, US | Rust ATX
- 2023-05-11 | Lehi, UT, US | Utah Rust
- 2023-05-16 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2023-04-27 | Brisbane, QLD, AU | Rust Brisbane
- 2023-05-03 | Christchurch, NZ | Christchurch 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
That said, I really like the language. It’s as if someone set out to design a programming language, and just picked all the right answers. Great ecosystem, flawless cross platform, built-in build tools, no “magic”, static binaries, performance-focused, built-in concurrency checks. Maybe these “correct” choices are just laser-targeted at my soul, but in my experience, once you leap over the initial hurdles, it all just works™️, without much fanfare.
Thanks to Ivan Tham 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