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
Newsletters
Project/Tooling Updates
Observations/Thoughts
- Preview crates
- Computed Properties in Rust: How to Implement Them Effectively
- Default musl allocator considered harmful (to performance)
- Fat Rand: How Many Lines Do You Need To Generate A Random Number?
- Revisiting random number generation
- Fast Parquet reading: From Java to Rust Columnar Readers
- Adding garbage collection to our Rust-based interpreters with MMTk
- Extending the Coreutils project - Rewriting base tools in Rust
- No-Panic Rust: A Nice Technique for Systems Programming
Rust Walkthroughs
- Cooperative multitasking in Rust
- Optimizing with Novel Calendrical Algorithms
- Apache Kafka protocol with serde, quote, syn and proc_macro2
- Pinning Down "Future Is Not Send" Errors
- Part 5b: Escaping the Typechecker, an Implementation
Miscellaneous
- [video playlist] Bevy Meetup #8
- [video] Match Ergonomics
- [video] Are we embedded yet? Implementing tiny HTTP server on a microcontroller using Rust with Maor Malka
Crate of the Week
This week's crate is ratzilla, a library for building terminal-themed web applications with Rust and WebAssembly.
Thanks to Orhun Parmaksız for the self-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.
Rust
- No calls for testing were issued this week.
Rustup
- No calls for testing were issued 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.
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.
- rama - add rama server benchmark to sharkbench
- rama - add rama to TechEmpower's FrameworkBenchmark
- rama - add full-stack rama benchmarks
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.
No Calls for papers or presentations were submitted this week.
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
425 pull requests were merged in the last week
#[optimize(none)]
implies#[inline(never)]
- -Znext-solver: "normalize" signature before checking it mentions self in
deduce_closure_signature
rustc_allowed_through_unstable_modules
: require deprecation messagerustc_hir_analysis
cleanups- ABI-required target features: warn when they are missing in base CPU
- add
AsyncFn*
tocore
prelude - add
kl
andwidekl
target features, and the feature gate - add constraint graph to polonius MIR dump
- add link attribute for Enzyme's LLVMRust FFI
- add mermaid graphs of NLL regions and SCCs to polonius MIR dump
- add missing allocator safety in alloc crate
- allow transmuting generic pattern types to and from their base
- cast global variables to default address space
- deduplicate operand creation between scalars, non-scalars and string patterns
- delay a bug when indexing unsized slices
- diagnostics: fix borrowck suggestions for if/while let conditionals
- disable
overflow_delimited_expr
in edition 2024 - do not consider child bound assumptions for rigid alias
- enable
unreachable_pub
lint inalloc
- explain why we retroactively change a static initializer to have a different type
- explicitly choose x86 softfloat/hardfloat ABI
- filter out RPITITs when suggesting unconstrained assoc type on too many generics
- fix autodiff compile time regression
- fix broken release notes id
- fix deduplication mismatches in vtables leading to upcasting unsoundness
- ignore NLL boring locals in polonius diagnostics
- implement MIR const trait stability checks
- implement MIR lowering for unsafe binders
- implement
int_from_ascii
- insert null checks for pointer dereferences when debug assertions are enabled
- interpret:
is_alloc_live
: check global allocs last - introduce a wrapper for "typed valtrees" and properly check the type before extracting the value
- lower index bounds checking to
PtrMetadata
, this time with the right fake borrow semantics 😸 - make comma separated lists of anything easier to make for errors
- make crate AST mutation accessible for driver callback
- manually walk into WF obligations in
BestObligation
proof tree visitor - merge
PatKind::Path
intoPatKind::Expr
- miri: improve error when
offset_from
preconditions are violated - miri: make float min/max non-deterministic
- miri: optimize zeroed alloc
- notes on types/traits used for in-memory query caching
- omit argument names from function pointers that do not have argument names
- omit unused args warnings for intrinsics without body
- overhaul
rustc_middle::util
- pass spans to
perform_locally_in_new_solver
- properly check that array length is valid type during built-in unsizing in index
- reject unsound toggling of Arm atomics-32 target feature
- shorten error message for callable with wrong return type
- suggest considering casting fn item as fn pointer in more cases
- support
clobber_abi
in BPF inline assembly - target modifiers (special marked options) are recorded in metainfo
- target option to require explicit cpu
- test validity of pattern types
- use proper type when applying deref adjustment in const
- use the type-level constant value
ty::Value
where needed - when encountering unexpected closure return type, point at return type/expression
miri_get_backtrace
: stop supporting the v0 protocol- miri: added a helper to dedup target OS checks
- miri: check fixed args number for variadic function
- miri: files: make read/write take callback to store result
- miri: increase thread limit for many-seeds mode
- miri: set
st_fstype
of stat on Solaris and Illumos OSes - miri: shim Apple's futex primitives
- miri: use
deref_pointer_as
instead ofderef_pointer
- stabilize
const_black_box
- stabilize
once_wait
- optimize
slice::ptr_rotate
for small rotates - implement all mix/max functions in a (hopefully) more optimization amendable way
- fix off-by-one error causing
slice::sort
to abort the program - don't build out of line atomics support code for uefi
- uefi: implement path
- cargo: conditionally mark the
test
cfg as a well known cfg - cargo: don't suggest
cargo login
when using incompatible credental providers - apply LTO config to rustdoc
- rustdoc: add
--output-format=doctest
command-line flag - rustdoc: add sans-serif font setting
- rustdoc: always use a channel when linking to doc.rust-lang.org
- bindgen:
process_comment
: Use last defined callback - bindgen: use
link_name
for dynamic library loading - clippy:
needless_option_take
: add autofix - clippy: add
manual_slice_fill
lint - clippy: autofix for
cmp_null
- clippy: autofix for
redundant_else
lint - clippy: do not remove semicolon if it changes the block type
- clippy: new lint for
and_then
when returning Option or Result - clippy: fix escaping problem in
write_literal
andprint_literal
lint suggestion - clippy: include generic arguments when suggesting a closure η-reduction
- clippy: move
format_push_string
andformat_collect
to pedantic - clippy: new
manual_option_as_slice
lint - clippy: new lint:
precedence_bits
, with recent additions to precedence - rust-analyzer: disable
Receiver
based autoderef temporarily - rust-analyzer: ensure
completion_item_hash
serializes items uniquely - rust-analyzer: fix scip indexing of module names
- rust-analyzer: fix some mir eval/lowerings
- rust-analyzer: properly handle CRLF line endings in the syntax tree view
- rust-analyzer: try to infer array type from slice pattern
- rust-analyzer: remove mutable syntax tree shenanigans from adjustment hints
- rust-analyzer: show status bar in output
Rust Compiler Performance Triage
A very quiet week with performance of primary benchmarks showing no change over all.
Triage done by @rylev. Revision range: f7538506..01e4f19c
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.3% | [0.2%, 0.6%] | 32 |
Regressions ❌ (secondary) |
0.5% | [0.1%, 1.1%] | 65 |
Improvements ✅ (primary) |
-0.5% | [-1.0%, -0.2%] | 17 |
Improvements ✅ (secondary) |
-3.1% | [-10.3%, -0.2%] | 20 |
All ❌✅ (primary) | 0.0% | [-1.0%, 0.6%] | 49 |
5 Regressions, 2 Improvements, 5 Mixed; 6 of them in rollups 49 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
Rust
- Derive
Copy
andHash
forIntErrorKind
- Tracking Issue for
integer_sign_cast
- Reject
?Trait
bounds in various places where we unconditionally warned since 1.0 - Don't require method impls for methods with
Self:Sized
bounds for impls for unsized types - Add more impls of PartialEq and PartialOrd for strings
- std: print a backtrace on stackoverflow
- Tracking Issue for File lock API
- Tracking Issue for
Vec::pop_if
- Stabilize const_slice_flatten
Cargo
- No Cargo Tracking Issues or PRs entered Final Comment Period this week.
Language Team
- No Language Team Proposals entered Final Comment Period this week.
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
- RFC: Add safe blocks
- RFC: Implement RealtimeSanitizer (RTSan) support, add
#[realtime(nonblocking)]
,#[realtime(blocking)]
attributes
Upcoming Events
Rusty Events between 2025-02-05 - 2025-03-05 🦀
Virtual
- 2025-02-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2025-02-06 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2025-02-07 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-02-11 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-02-12 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2025-02-13 | Virtual (Berlin, DE) | Rust Berlin
- 2025-02-14 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-02-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2025-02-20 | Hybrid (Redmond, WA, US) | Seattle Rust User Group
- 2025-02-21 | Virtual (Jersey City, NJ, US) | Jersey City Classy and Curious Coders Club Cooperative
- 2025-02-25 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-02-25 | Virtual (London, UK) | Women in Rust
- 2025-02-25 | Virtual (Washington, DC, US) | Rust DC
- 2025-02-27 | Virtual (Berlin, DE) | Rust Berlin
- 2025-02-27 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2025-03-05 | Virtual (Indianapolis, IN, US) | Indy Rust
Africa
- 2025-02-11 | Johannesburg, ZA | Johannesburg Rust Meetup
Asia
- 2025-02-24 | Tel Aviv-Yafo, IL | Rust 🦀 TLV
Europe
- 2025-02-05 | Girona, ES | Rust Girona
- 2025-02-05 | Köln, DE | Rust Cologne
- 2025-02-05 | Oxford, UK | Oxford Rust Meetup Group
- 2025-02-06 | Gdansk, PL | Rust Gdansk
- 2025-02-12 | Reading, UK | Reading Rust Workshop
- 2025-02-14 | Edinburgh, UK | Rust and Friends
- 2025-02-18 | Leipzig, SN, DE | Rust - Modern Systems Programming in Leipzig
- 2025-02-19 - 2025-02-20 | London, UK | Rust Nation UK
- 2025-02-20 | Bern, CH | Rust Bern
- 2025-02-21 | London, UK | Rust Global: London 2025
- 2025-02-22 | Stockholm, SE | Stockholm Rust
- 2025-02-25 | Madrid, ES | MadRust
- 2025-02-26 | Darmstadt, DE | Rust Rhein Main
- 2025-02-27 | Oslo, NO | Rust Oslo
- 2025-02-27 | Paris, FR | Rust Paris
- 2025-03-05 | Barcelona, ES | BcnRust
North America
- 2025-02-06 | Montréal, CA | Rust Montréal
- 2025-02-06 | Mountain View, CA, US | Hacker Dojo
- 2025-02-06 | Saint Louis, MO, US | STL Rust
- 2025-02-08 | Dallas, TX, US | Dallas Rust User Meetup
- 2025-02-11 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2025-02-14 | Boston, MA, US | Boston Rust Meetup
- 2025-02-18 | San Francisco, CA, US | San Francisco Rust Study Group
- 2025-02-20 | Nashville, TN, US | Music City Rust Developers
- 2025-02-20 | Redmond, WA, US | Seattle Rust User Group
- 2025-02-21 | México City, MX | Rust MX
- 2025-02-22 | Boston, MA, US | Boston Rust Meetup
- 2025-02-26 | Austin, TX, US | Rust ATX
- 2025-02-27 | Atlanta, GA, US | Rust Atlanta
- 2025-03-02 | Boston, MA, US | Boston Rust Meetup
South America:
- 2025-02-06 | 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
If your rust code compiles and you don't use "unsafe", that is a pretty good certification.
– Richard Gould about Rust certifications on rust-users
Thanks to ZiCog for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, U007D, joelmarcey, mariannegoldin, bennyvasquez, bdillo
Email list hosting is sponsored by The Rust Foundation