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 X (formerly 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.
Want TWIR in your inbox? Subscribe here.
Updates from Rust Community
Official
Foundation
- Announcing the Rust Foundation’s Newest Project Director: Carol Nichols
- Rust Foundation Collaborates With AWS Initiative to Verify Rust Standard Libraries
EuroRust 2024
- Through the Fire and the Flames - Jon Gjengset
- Build bigger in less time: code testing beyond the basics - Predrag Gruevski
- A gentle introduction to procedural macros - Sam Van Overmeire
- Practical Rust for Web Audio - Attila Haraszti
- Augmented docs: a love letter to rustdoc and docs.rs - Francois Mockers
- The Impact of Memory Allocators on Performance: A Deep Dive - Arthur Pastel
- Proving macro expansion with expandable - Sasha Pourcelot
- Runtime Scripting for Rust Applications - Niklas Korz
- Unleashing 🦀 The Ferris Within - Victor Ciura
- The first six years in the development of Polonius - Amanda Stjerna
- Non-binary Rust: Between Safe and Unsafe - Boxy Uwu
- Writing a SD Card driver in Rust - Johnathan Pallant
- My Journey from WebDev to Medical Visualization Rustacean - David Peherstorfer
- Code to contract to code: making ironclad APIs - Adam Chalmers
- Rust Irgendwie, Irgendwo, Irgendwann - Henk Oordt
- Linting with Dylint - Samuel Moelius
RustConf 2024
- Dr. Rebecca Rumbul (Rust Foundation Executive Director): "Welcome Remarks"
- Aeva Black: "Making Open Source Secure by Design" | KEYNOTE
- Marc-André Moreau (CTO, Devolutions): Diamond Sponsor Talk
- Nick Cameron: "Eternal Sunshine of the Rustfmt'ed Mind"
- Jack Wrenn: "Safety Goggles for Alchemists"
- Rohit Dandamundi: "Widening the Ferris Net"
- Isabel Atkinson: "Rustify Your API: A Journey from Specification to Implementation"
- Sparrow Li: "The Current State and Future of Rust Compiler Performance"
- Nathan Stocks: "Shooting Stars! Livecode a Game in Less Than 30 Mins"
- Pedro Rittner & Sean Lawlor: "Actors and Factories in Rust"
- David Koloski: "The (Many) Mistakes I Made in rkyv"
- Kyler Chin: "How We Built a Rust-y Real-Time Public Transport Map"
- Adam Chalmers: "Making a Programming Language for 3D Design"
- Martin Pool: "Finding Bugs with cargo-mutants"
- 1Password, Adobe, Woven by Toyota: Gold Sponsor Lightning Talks
- Miguel Ojeda (Rust for Linux): KEYNOTE
- JetBrains, K2 Space, Zed: Gold Sponsor Lightning Talks
- Jonathan Pallant: "Six Clock Cycle per Pixel - Graphics on the Neotrol Pico"
- Joannah Nanjekye: "Rust Interop: Memory Safety Across Foreign Function Boundaries"
- Jacob Pratt: "Compiler-Driven Development: Making Rust Work for You"
- Angus Morrison: "How Rust is Powering Next-Generation Space Mission Simulators"
- Michael Gattozzi: "What Happens When You Run Cargo Build?"
- Pallavi Thukral: "Rust in Motion: Building Reliable and Performant Robotics Systems"
- Marc-André Giroux: "Low-Overhead Observability in High-RPS Servers"
- Predrag Gruevski: "Putting an End to Accidental SemVer-Breaking Changes"
- Chris Biscardi: "Web Sites, Web Apps, and Web Assembly"
- Nicholas Matsakis (Co-Lead, Rust Design Team): "Rust Roadmap 2.0" | KEYNOTE
- Frédéric Ameye: "Rust in Legacy Regulated Industries"
- Walter Pearce: "Dude, Where's My C?"
- Ed Jones: "Fearless Refactoring & the Art of Argument-Free Rust"
- Dr. Rebecca Rambul: Opening Remarks
- OxidOS Sponsored Talk
- Martin Geisler: "Rust Training at Scale"
- Quanyi Ma: "Embracing Monorepo and LLM Evolution"
- Joshua Liebow-Feeser: "Safety in an Unsafe World"
- Jack Huey & James Munns: "An Outsider's Guide to the Rust Project"
Newsletters
Project/Tooling Updates
- hyper in curl Needs a Champion
- godot-rust November 2024 dev update
- Security in hickory-dns
- Virtual Geometry in Bevy 0.15
- Glues v0.5 - Editor Tabs and Enhanced Vim Commands
- Streaming data analytics, Fluvio 0.13.0 release
- Rerun 0.20 - Geospatial data and full H.264 support
- git-cliff 2.7.0 is released! (a highly customizable changelog generator)
Observations/Thoughts
- You don't (always) need async
- The fastest WASM zlib
- A rustc soundness bug in the wild
- [audio] Compile Time Crimes
- [audio] Oxide with Steve Klabnik
Rust Walkthroughs
- Zed Rope Optimizations, Part 1
- Futexes at Home
- Build your own SQLite, Part 3: SQL parsing 101
- dtype_dispatch: a most beautiful hack
- Sending Events to Bevy from anywhere
- Building an email address parser in Rust with nom
- Exploring Async Runtimes by Building our Own
- Traits to Unify all Vectors
- Basics of Pinning in Rust
- Building a Wifi-controlled car with Rust and ESP32
- [video] Build with Naz : Diesel ORM, SQLite and Rust
Crate of the Week
This week's crate is fixed-slice-vec, a no-std dynamic length Vec with runtime-determined maximum capacity backed by a slice.
Thanks to Jay Oster for the suggestion!
Please submit your suggestions and votes for next week!
Calls 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:
RFCs
- No calls for testing were issued this week.
- Testing Steps
Rust
- No calls for testing were issued this week.
- Testing steps
Rustup
- No calls for testing were issued this week.
- Testing steps
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.
Call for Participation; projects and speakers
CFP - Projects
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.
If you are a Rust project owner and are looking for contributors, please submit tasks here or through a PR to TWiR or by reaching out on X (formerly Twitter) or Mastodon!
CFP - Events
Are you a new or experienced speaker looking for a place to share something cool? This section highlights events that are being planned and are accepting submissions to join their event as a speaker.
If you are an event organizer hoping to expand the reach of your event, please submit a link to the website through a PR to TWiR or by reaching out on X (formerly Twitter) or Mastodon!
Updates from the Rust Project
480 pull requests were merged in the last week
- ABI checks: add support for some tier3 arches, warn on others
- ABI checks: add support for tier2 arches
- CFI: append debug location to CFI blocks
- AIX: Add crate "unwind" to link with libunwind
- illumos: use pipe2 to create anonymous pipes
check_consts
: fix error requesting feature gate when that gate is not actually neededconst_panic
: inline in bootstrap builds to avoid f16/f128 crashesrustc_metadata
: Preprocess search paths for better performancesuggest_borrow_generic_arg
: instantiate clauses properly- add
visit_coroutine_kind
toast::Visitor
- add parentheses when unboxing suggestion needed
- add reference annotations for diagnostic attributes
- allow CFGuard on windows-gnullvm
- always inline functions signatures containing
f16
orf128
- borrowck diagnostics: suggest borrowing function inputs in generic positions
- change
Visitor::visit_precise_capturing_arg
so it returns aVisitor::Result
- change intrinsic declarations to new style
- check
use<..>
in RPITIT for refinement - consolidate type system const evaluation under
traits::evaluate_const
- delete the
cfg(not(parallel))
serial compiler - deny capturing late-bound ty/const params in nested opaques
- diagnostics for let mut in item context
- extend the "if-unchanged" logic for compiler builds
- feature gate yield expressions not in 2024
- fix ICE when passing DefId-creating args to
legacy_const_generics
- fix
REGISTRY_USERNAME
to reuse cache between auto and pr jobs - fix a copy-paste issue in the NuttX raw type definition
- fix compilation error on Solaris due to flock usage
- fix span edition for 2024 RPIT coming from an external macro
- for expr
return (_ = 42); unused_paren
lint should not be triggered - handle infer vars in anon consts on stable
- improve VecCache under parallel frontend
- increase accuracy of
if
condition misparse suggestion - liberate
aarch64-gnu-debug
from the shackles of--test-args=clang
- likely unlikely fix
- make precise capturing suggestion machine-applicable only if it has no APITs
- make sure to ignore elided lifetimes when pointing at args for fulfillment errors
- mention both release and edition breakage for never type lints
- move all mono-time checks into their own folder, and their own query
- proper support for cross-crate recursive const stability checks
- querify MonoItem collection
- recurse into APITs in
impl_trait_overcaptures
- refactor
configure_annotatable
- remove attributes from generics in built-in derive macros
- rename
rustc_const_stable_intrinsic
→rustc_intrinsic_const_stable_indirect
- skip locking span interner for some syntax context checks
- trim extra space when suggesting removing bad
let
- trim whitespace in RemoveLet primary span
- tweak attributes for const panic macro
- unify FnKind between AST visitors and make WalkItemKind more straight forward
- use
TypingMode
throughout the compiler instead ofParamEnv
- warn about invalid
mir-enable-passes
pass names - miri: implement blocking eventfd
- miri: refactor: refine thread variant for windows
- miri: renamed
this
toecx
inextern_static
- miri: use -Zroot-dir instead of --remap-path-prefix for diagnostic dir handling
- stabilize
const_atomic_from_ptr
- stabilize
const_option_ext
- stabilize
const_ptr_is_null
- stabilize
const_unicode_case_lookup
- vectorize
slice::is_sorted
#[inline]
integer parsing functions- add
as_slice/into_slice
for IoSlice/IoSliceMut - generalize
NonNull::from_raw_parts
per ACP362 - rwlock downgrade
- implement
mixed_integer_ops_unsigned_sub
- improve codegen of
fmt_num
to delete unreachable panic - float types: move copysign, abs, signum to libcore
- make
CloneToUninit
dyn-compatible - mark
is_val_statically_known
intrinsic as stably const-callable - optimize
char::to_digit
and assert radix is at least 2 - hashbrown: further sequester
Group
/Tag
code - hashbrown: mark const fn constructors as
rustc_const_stable_indirect
- codegen_gcc: fix volatile loads and stores
- cargo resolver: Stabilize resolver v3
- cargo rustdoc: diplay env vars in extra verbose mode
- cargo fix: error context for
git_fetch
refspec not found - cargo: always include Cargo.lock in published crates
- cargo: migrate build-rs to the Cargo repo
- cargo: simplify English used in guide
- rustdoc search: allow queries to end in an empty path segment
- rustdoc-search: case-sensitive only when capitals are used
- rustdoc-search: use smart binary search in bitmaps
- rustdoc: treat declarative macros more like other item kinds
- rustdoc: use a trie for name-based search
- rustdoc: Fix duplicated footnote IDs
- rustdoc: Fix handling of footnote reference in footnote definition
- rustdoc: Fix items with generics not having their jump to def link generated
- rustdoc: Perform less work when cleaning
middle::ty
parenthesized generic args - clippy:
missing_safety_doc
accept uppercase "SAFETY" - clippy: allow conditional
Send
futures infuture_not_send
- clippy: do not trigger
if_let_mutex
starting from Edition 2024 - clippy: don't lint CStr literals, do lint float literals in
redundant_guards
- clippy: handle
Option::map_or(true, …)
inunnecessary_map_or
lint - clippy: new lint:
unnecessary_map_or
- clippy: support user format-like macros
- rust-analyzer: migrate
reorder_fields
assist to useSyntaxFactory
Rust Compiler Performance Triage
We saw improvements to a large swath of benchmarks with the querification of MonoItem collection (PR #132566). There were also some PRs where we are willing to pay a compile-time cost for expected runtime benefit (PR #132870, PR #120370), or pay a small cost in the single-threaded case in exchange for a big parallel compilation win (PR #124780).
Triage done by @pnkfelix. Revision range: d4822c2d..7d40450b
2 Regressions, 4 Improvements, 10 Mixed; 6 of them in rollups 47 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 were approved this week.
Tracking Issues & PRs
Rust
- [disposition: merge] Always display first line of impl blocks even when collapsed
- [disposition: merge] Stabilize async closures (RFC 3668)
- [disposition: merge] Tracking Issue for fn const BuildHasherDefault::new()
- [disposition: merge] Add
AsyncFn*
to to the prelude in all editions - [disposition: merge] Tracking Issue for #![feature(const_float_methods)]
Cargo
- [disposition: merge] Add future-incompat warning against keywords in cfgs and add raw-idents
Language Team
- [disposition: merge] Consensus check: let-chains and is are not mutually exclusive
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guideline Tracking Issues or PRs entered Final Comment Period this week.
New and Updated RFCs
Upcoming Events
Rusty Events between 2024-11-20 - 2024-12-18 🦀
Virtual
- 2024-11-20 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2024-11-20 | Virtual and In-Person (Vancouver, BC, CA) | Vancouver Rust
- 2024-11-21 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-11-21 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-11-21 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2024-11-25 | Virtual (Bratislava, SK) | Bratislava Rust Meetup Group
- 2024-11-26 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-11-28 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-11-28 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-12-03 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2024-12-04 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-12-05 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2024-12-07 | Virtual (Kampala, UG) | Rust Circle Kampala
- 2024-12-10 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-12-11 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2024-12-12 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-12-12 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-12-17 | Virtual (Washington, DC, US) | Rust DC
Africa
- 2024-12-10 | Johannesburg, ZA | Johannesburg Rust Meetup
- 2024-12-07 | Virtual( Kampala, UG) | Rust Circle Kampala
Asia
- 2024-11-21 | Seoul, KR | Rust Programming Meetup Seoul
- 2024-11-28 | Bangalore/Bengaluru, IN | Rust Bangalore
- 2024-11-30 | Tokyo, JP | Rust Tokyo
Europe
- 2024-11-20 | Paris, FR | Rust Paris
- 2024-11-21 | Copenhagen, DK | Copenhagen Rust Community
- 2024-11-21 | Edinburgh, UK | Rust and Friends
- 2024-11-21 | Madrid, ES | MadRust
- 2024-11-21 | Oslo, NO | Rust Oslo
- 2024-11-23 | Basel, CH | Rust Basel
- 2024-11-25 | Zagreb, HR | impl Zagreb for Rust
- 2024-11-26 | Warsaw, PL | Rust Warsaw
- 2024-11-27 | Dortmund, DE | Rust Dortmund
- 2024-11-28 | Aarhus, DK | Rust Aarhus
- 2024-11-28 | Augsburg, DE | Rust Meetup Augsburg
- 2024-11-28 | Berlin, DE | OpenTechSchool Berlin + Rust Berlin
- 2024-11-28 | Gdansk, PL | Rust Gdansk
- 2024-11-28 | Hamburg, DE | Rust Meetup Hamburg
- 2024-11-28 | Manchester, UK | Rust Manchester
- 2024-11-28 | Prague, CZ | Rust Prague
- 2024-12-03 | Copenhagen, DK | Copenhagen Rust Community
- 2024-12-04 | Oxford, UK | Oxford Rust Meetup Group
- 2024-12-05 | Olomouc, CZ | Rust Moravia
- 2024-12-06 | Moscow, RU | RustCon RU
- 2024-12-11 | Reading, UK | Reading Rust Workshop
- 2024-12-12 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2024-12-17 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
North America
- 2024-11-21 | Chicago, IL, US | Chicago Rust Meetup
- 2024-11-23 | Boston, MA, US | Boston Rust Meetup
- 2024-11-25 | Ferndale, MI, US | Detroit Rust
- 2024-11-26 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2024-11-27 | Austin, TX, US | Rust ATX
- 2024-11-28 | Mountain View, CA, US | Hacker Dojo
- 2024-12-05 | St. Louis, MO, US | STL Rust
- 2024-12-10 | Ann Arbor, MI, US | Detroit Rust
- 2024-12-12 | Mountain View, CA, US | Hacker Dojo
- 2024-12-16 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2024-12-17 | San Francisco, CA, US | San Francisco Rust Study Group
Oceania
- 2024-12-04 | Sydney, AU | Rust Sydney
- 2024-12-08 | Canberra, AU | Canberra Rust User 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
The whole point of Rust is that before there were two worlds:
- Inefficient, garbage collected, reliable languages
- Efficient, manually allocated, dangerous languages
And the mark of being a good developer in the first was mitigating the inefficiency well, and for the second it was it didn't crash, corrupt memory, or be riddled with security issues. Rust makes the trade-off instead that being good means understanding how to avoid the compiler yelling at you.
Thanks to binarycat 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