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
Newsletters
Project/Tooling Updates
Observations/Thoughts
- Great things about Rust that aren't just performance
- Rust In Space! How Rust is Powering Next-Generation Space Mission Simulators
- Bevy Efficiency on Mobile
- Why nextest is process-per-test
- From Go to Rust 1: async Dispatch
- This Month in @compiler-errors (rustc contributions)
- Building functional safety at speed with Rust
- You do not need multithreading to do more than one thing at a time
- A journey into File Transfer Protocols in Rust
- Floating point to hex converter – supports 16-bit floats, in Rust and WebAssembly!
Rust Walkthroughs
- Master Hexagonal Architecture in Rust Part IV: Trade-Offs of Hexagonal Architecture
- The Definitive Guide to Error Handling in Rust Part III: Structured Error Handling
Miscellaneous
- [video] Tue Henriksen on Rust in Embedded Systems, Misconceptions, & Building Community
- Bevy at RustWeek 2025: come hack with us!
- My failed attempt at AGI on the Tokio Runtime
- The JIT calculator challenge
- Gameboy on your terminal written in Rust
- [video] BlockMesh Network - a full-stack open source project in Rust with Ohad Dahan
Crate of the Week
This week's crate is terminal-colorsaurus, a small library to detect whether the terminal is in light or dark mode.
Thanks to Tau 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
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.
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.
- Rust Week (Rust NL) | Closes on 2024-01-12 | Utrecht, NL | Event on 2025-05-13
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
375 pull requests were merged in the last week
- add m68k-unknown-none-elf target
- target: add mips mti baremetal support
- A few borrowck tweaks to improve 2024 edition migration lints
- E0277: suggest dereferencing function arguments in more cases
- Debuginfo: Force
enum DISCR_*
tostatic const u64
to allow for inspection via LLDB ObligationCause
construction tweaks in typeckgeneric_assert
Constify methods used by the formatting systemcg_llvm
: Use constants for DWARF opcodes, instead of FFI callsrustc_intrinsic
: support functions without body- add a notion of "some ABIs require certain target features"
- add suggestion for wrongly ordered format parameters
- add support for wasm exception handling to Emscripten target
- avoid use of LFS64 symbols on Emscripten
- borrowck diagnostics: make
add_move_error_suggestions
use the HIR rather thanSourceMap
- const-in-pattern: test that the PartialEq impl does not need to be const
- deny usage of special FileCheck prefixes as revision names
- don't enable anyhow's
backtrace
feature in opt-dist - don't ice on bad transmute in typeck in new solver
- fix ICE when opaque captures a duplicated/invalid lifetime
- force code generation in assembly generation smoke-tests
- improve diagnostics for
HostEffectPredicate
in the new solver - improve infer (
_
) suggestions inconst
s and statics
- pass objcopy args for stripping on OSX
- pass the arch rather than full target name to
windows_registry::find_tool
- project to
TyKind::Error
when there are unconstrained non-lifetime (ty/const) impl params - provide structured suggestion for
impl Default
of type where all fields have defaults - remove allowing
static_mut_refs
lint - remove range-metadata amdgpu workaround
- report correct
SelectionError
forConstArgHasType
in new solver fulfill - report impl method has stricter requirements even when RPITIT inference gets in the way
- some type-outlives computation tweaks
- suggest to replace tuple constructor through projection
- suppress host effect predicates if underlying trait doesn't hold
- switch rtems target to panic unwind
- taint fcx on selection errors during unsizing
- turn
rustc_box
into an intrinsic - use
PostBorrowckAnalysis
incheck_coroutine_obligations
- miri: concurrency: generalize UnblockCallback to MachineCallback
- library: fix adler{ → 2}.debug
- mark
slice::reverse
unstably const - std: sync to dep versions of backtrace
- try to write the panic message with a single
write_all
call - char
to_digit
: avoid unnecessary casts to u64 - core: implement
bool::select_unpredictable
- do not in-place-iterate over flatmap/flatten
- cargo: fix
https::self_signed_should_fail
for macos - cargo: fix: env table config can't trigger rebuild with
rerun-if-env-changed
- rustdoc: fix mismatched capitalization in sidebar
- rustdoc: treat
allowed_through_unstable_modules
as deprecation - clippy:
clippy::redundant_locals
is not a correctness lint - clippy:
needless_continue
: lint if the last stmt in loop iscontinue
recurisvely - clippy: add lint for calling
Iterator::last()
onDoubleEndedIterator
- clippy: check if deref target implements
is_empty
forlen_zero
lint - clippy: do not trigger
missing_const_for_fn
for tests - clippy: improve
slow_vector_initialization
suggestion - clippy: only emit
useless_vec
suggestion if the macro does not contain code comments - rust-analyzer: allow targetDir to be an absolute path
- rust-analyzer: disable
rustc_test
metrics again - rust-analyzer: allow excluding specific traits from completion
- rust-analyzer: support the new
CoercePointee
derive - rust-analyzer: support updating snapshot tests with codelens/hovering/runnables
- rust-analyzer: fix case where completion inside macro that expands to
#[test]
was unavailable - rust-analyzer: fix metrics workflow
- rust-analyzer: fix no space insert before and after if value is only spaces
- rust-analyzer: be more permissive with completion resolve data
- rust-analyzer: clear diagnostics on cancel unconditionally
- rust-analyzer: clear flycheck diagnostics per package properly
- rust-analyzer: deduplicate crate graph
- rust-analyzer: fix a bug that was caused by fixup reversing
- rust-analyzer: fix flycheck cancellations leaving stale errors
- rust-analyzer: fix flycheck getting confused which package to check
- rust-analyzer: fix non-cargo flychecks immediately clearing received diagnostics
- rust-analyzer: fix overflow detection in MIR evaluation
- rust-analyzer: fix relative .cargo env vars not working
- rust-analyzer: handle newstyle
rustc_intrinsic
safety correctly - rust-analyzer: hide synthetic locals from completions
- rust-analyzer: store token trees in contiguous
Vec
instead of as a tree
Rust Compiler Performance Triage
A quiet week with not much going on. A small regression was caused by a bugfix related to traits, but it was somewhat offset by a cargo update that brought a small perf. win.
Triage done by @kobzol. Revision range: 93722f7e..0f1e965f
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.4% | [0.1%, 1.1%] | 20 |
Regressions ❌ (secondary) |
0.4% | [0.1%, 2.5%] | 19 |
Improvements ✅ (primary) |
-0.4% | [-1.6%, -0.2%] | 8 |
Improvements ✅ (secondary) |
-1.3% | [-1.7%, -0.2%] | 13 |
All ❌✅ (primary) | 0.1% | [-1.6%, 1.1%] | 28 |
0 Regressions, 2 Improvements, 4 Mixed; 4 of them in rollups 51 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
Tracking Issues & PRs
Rust
- Tracking Issue for
float_next_up_down
Impl TryFrom<Vec<u8>> for String
- Tracking Issue for anonymous pipe API
- Convert
struct FromBytesWithNulError
into enum
Cargo
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
- No New or Updated RFCs were created this week.
Upcoming Events
Rusty Events between 2025-01-08 - 2025-02-05 🦀
Virtual
- 2025-01-08 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-01-09 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2025-01-09 | Virtual (Miami, FL, US) | Rust Miami
- 2025-01-09 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2025-01-14 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-01-15 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-01-15 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2025-01-16 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2025-01-16 | Virtual and In-Person (Seattle, WA, US) | Seattle Rust User Group
- 2025-01-21 | Virtual (Tel Aviv-Yafo, IL) | Rust 🦀 TLV
- 2025-01-21 | Virtual (Washington, DC, US) | Rust DC
- 2025-01-22 | Virtual (Rotterdam, NL) | Bevy Game Development
- 2025-01-23 & 2025-01-24 | Virtual | Mainmatter Rust Workshop
- 2025-01-26 | Virtual (Tel Aviv-Yafo, IL) | Rust 🦀 TLV
- 2025-01-28 | Virtual (Dallas, TX, US) | Dallas Rust User Meetup
- 2025-01-30 | Virtual (Berlin, DE) | OpenTechSchool Berlin + Rust Berlin
- 2025-01-30 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2025-01-30 | Virtual (Tel Aviv-Yafo, IL) | Code Mavens 🦀 - 🐍 - 🐪
- 2025-02-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
Asia
- 2025-01-12 | Tel Aviv-Yafo, IL | Rust 🦀 TLV
Europe
- 2025-01-08 | Girona, ES | Rust Girona
- 2025-01-08 | Köln, DE | Rust Cologne
- 2025-01-08 | Reading, UK | Reading Rust Workshop
- 2025-01-09 | Oslo, NO | Rust Oslo
- 2025-01-14 | Mannheim, DE | Hackschool - Rhein-Neckar
- 2025-01-16 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2025-01-16 | Karlsruhe, DE | Rust Hack & Learn Karlsruhe
- 2025-01-18 | Stockholm, SE | Stockholm Rust
- 2025-01-21 | Ghent, BE | Systems Programming Ghent
- 2025-01-21 | Leipzig, SN, DE | Rust - Modern Systems Programming in Leipzig
- 2025-01-22 | Oberursel, DE | Rust Rhein Main
- 2025-01-23 | Barcelona, ES | Barcelona Free Software
- 2025-01-23 | Paris, FR | Rust Paris
- 2025-01-27 | Prague, CZ | Rust Prague
- 2025-01-28 | Aarhus, DK | Rust Aarhus
- 2025-01-30 | Augsburg, DE | Rust Meetup Augsburg
- 2025-01-30 | Berlin, DE | Rust Berlin
- 2025-02-01 | Brussels, BE | FOSDEM 2025
- 2025-02-01 | Nürnberg, DE | Rust Nuremberg
- 2025-02-05 | Oxford, GB | Oxford Rust Meetup Group
North America
- 2025-01-08 | Austin, TX, US | Rust ATX
- 2025-01-09 | Mountain View, CA, US | Hacker Dojo
- 2025-01-10 | Boston, MA, US | Boston Rust Meetup
- 2025-01-14 | Chicago, IL, US | Chicago Rust Meetup
- 2025-01-16 | Nashville, TN, US | Music City Rust Developers
- 2025-01-16 | Seattle, WA, US | Seattle Rust User Group
- 2025-01-17 | México City, MX | Rust MX
- 2025-01-18 | Boston, MA, US | Boston Rust Meetup
- 2025-01-21 | San Francisco, CA, US | San Francisco Rust Study Group
- 2025-01-22 | Austin, TX, US | Rust ATX
- 2025-01-23 | Mountain View, CA, US | Hacker Dojo
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
Also, there is often a trade-off between accuracy and education. For example, when I correct my toddler that the Sun is actually not moving, but we are rotating. That's wrong, the Sun is moving, but arguably less wrong than his impression. (I once tried to give him the full explanation, but halfway through he ran away to play with his trains.)
Not that readers of the Rust book are toddlers, but the principle generalizes in my experience.
– Andrew Gallant a.k.a. @BurntSushi on rust-users
Thanks to Aleksander Krauze 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