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 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.
Updates from Rust Community
Official
Project/Tooling Updates
- Rustdoc JSON in 2023
- 2023 in Review: Establishing Rust as a Godot 4 language
- Rust9x update: Rust 1.76.0-beta
- Announcing smol-macros, smol-hyper and smol-axum
- Rust Language Bootstrap Team Progress Report 2023
- gitoxide: The year in retrospective, and what's to come
Observations/Thoughts
- A few fast solutions for Advent of Code 2023
- How to Build Abstractions in Rust Applications: The Missing Rung on the Rust Education Ladder
- avatar.png
- Arc vs String, is Arc really faster?
- Iggy.rs - building message streaming in Rust
- Getting Started with Loco in Rust: Part 1
- Printing errors in Rust
- [video] Rust 1.75.0: 54 highlights in 20 minutes!
Miscellaneous
- Test command line application written in Rust
- Open Source Applications written in Rust
- Prompt - read input from Standard Input (STDIN) in Rust
- Testing Your Embedded Rust (feat. embedded-hal-mock and explosions)
- [video] Rust Release Train 1.75
- [video] Rust 1.75.0: 54 highlights in 20 minutes
Crate of the Week
This week's crate is fast_pool, a fast async pool based on the flume channel crate.
Thanks to zhuxiujia for the self-suggestion!
Please submit your suggestions and votes for next week!
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.
- Hyperswitch - Implement Code cov for local system using makefile
- Hyperswitch - Setup code coverage for local tests & CI
- Hyperswitch - Add domain type for client secret
- Hyperswitch - Have get_required_value to use ValidationError in OptionExt
- Ockam - Use GitHub API to check if the CLI is outdated
- Ockam - refactor to use typed interfaces to implement commands for
kafka services
- Ockam - Validate CBOR structs according to the cddl schema for
cloud/space
andcloud/subscription
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
194 pull requests were merged in the last week
rustc_lint
: Enforcerustc::potential_query_instability
lintrustc_lint
: Prevent triplication of various lintsunused_bindings
: also walk bindings created by if-let guards- change
rustc_codegen_ssa
'satomic_cmpxchg
interface to return a pair of values - coverage: avoid a possible query stability hazard in
CoverageCounters
- coverage: prepare mappings separately from injecting statements
- coverage: unexpand spans with
find_ancestor_inside_same_ctxt
- don't drop a hir node after lowering
- don't suggest writing a bodyless arm if the pattern can never be a never pattern
- don't validate / lint MIR before each pass
- enable profiler in dist-powerpc-linux
- fix infinite loop in
<BoundConstness as Display>
- fix invalid check-cfg Cargo feature diagnostic help
- fix parenthesization of subexprs containing statement boundary
- fix: correct the args for
disambiguate the associated function
diagnostic - fix: diagnostic for casting reference to slice
- introduce
const Trait
(always-const trait bounds) - simplify
Parser::ident_or_error
- simplify bootstrap
--check-cfg
arguments - solaris support on bootstrap lock
- subtree sync for
rustc_codegen_cranelift
- suggest
=>
→>=
in comparisons - utilize the unused
llvm-tools
option - miri: fix integer overflow ICEs from
round_up_to_next_multiple_of
- miri: NaN non-determinism for intrinsics and libm functions
- miri: support for tempfile crate on UNIX hosts
- implement constant propagation on top of MIR SSA analysis
- only store StableCrateId once in DefPathTable
- shrink span encoding further
- openbsd:
available_parallelism
: use the right API - cargo:
cargo add
- fix for adding features from repository with multiple packages - cargo:
cargo fix
: always inherit the jobserver - cargo: fix
fix::fix_in_dependency
to not rely on rustc - cargo: rustfix: support inserting new lines
- rustdoc-search: count path edits with separate edit limit
- rustdoc: treat query string
+
as space - clippy: check for redundant
matches!
withReady
,Pending
,V4
,V6
- clippy:
[doc_markdown]
: Add "WebGL2", "WebGPU" to defaultdoc_valid_idents
- clippy: add external macro checks to
iter_without_into_iter
andinto_iter_without_iter
- clippy: don't lint
default_numeric_fallback
on return and local assigned macro calls with type stated - clippy: extend
unconditional_recursion
to check for ToString implementations - clippy: add
manual_is_variant_and
lint - clippy: add new lint
pub_underscore_fields
- clippy: suggest
str.lines
when splitting at hard-coded newlines - clippy: make
mutex_atomic
more type aware - clippy: new lint:
empty_enum_variants_with_brackets
- clippy: new lint:
thread_local_initializer_can_be_made_const
- clippy: new lint:
eager_transmute
- clippy: remove mitigations for incorrect node args
- rust-analyzer: fix SyntaxContextID using incorrect self IDs
- rust-analyzer: fix out-of-bounds panic in some macros due to unhandled
self_ref
Rust Compiler Performance Triage
Overall, this week had very few regressions and a moderate amount of improvements. The two biggest improvements came in how metadata was being encoded including a change to only store StableCrateId once in DefPathTable which yielded a 0.3% average improvement across 79 different benchmarks.
Triage done by @rylev. Revision range: 1ab783112..67b6975
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.7% | [0.3%, 1.5%] | 8 |
Regressions ❌ (secondary) |
0.8% | [0.2%, 1.3%] | 23 |
Improvements ✅ (primary) |
-0.6% | [-2.6%, -0.2%] | 121 |
Improvements ✅ (secondary) |
-5.2% | [-62.5%, -0.2%] | 53 |
All ❌✅ (primary) | -0.5% | [-2.6%, 1.5%] | 129 |
2 Regressions, 3 Improvements, 1 Mixed; 0 of them in rollups 46 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
- [disposition: merge] rustdoc: search for tuples and unit by type with ()
Language Reference
- No Language Reference RFCs entered Final Comment Period this week.
Unsafe Code Guidelines
- No Unsafe Code Guideline RFCs entered Final Comment Period this week.
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 2024-01-03 - 2024-01-31 🦀
Virtual
- 2024-01-03 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2024-01-06 | Virtual (Kampala, UG) | Rust Circle
- 2024-01-09 | Virtual (Dallas, TX, US) | Dallas Rust
- 2024-01-11 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-01-11 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2024-01-16 | Virtual (Washington, DC, US) | Rust DC
- 2024-01-17 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2024-01-18 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2024-01-21 | Virtual | Rust Maven
- 2024-01-23 | Virtual (Halifax, NS, CA) | Rust Halifax
- 2024-01-24 | Virtual (Berlin, DE) | WeAreDevelopers Community
- 2024-01-25 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-01-28 | Virtual (Wrocław, PL) | Stacja IT Wrocław
- 2024-01-30 | Virtual (Buffalo, NY, US) | Buffalo Rust User Group
- 2024-01-30 | Virtual (Dallas, TX, US) | Dallas Rust
Europe
- 2024-01-10 | Cologne, DE | Rust Cologne
- 2024-01-11 | Reading, UK | Reading Rust Workshop
- 2024-01-11 | Wrocław, PL | Rust Wrocław
- 2024-01-13 | Tampere, FI | Finland Rust-lang Group
- 2024-01-16 | Leipzig, DE | Rust - Modern Systems Programming in Leipzig
- 2024-01-17 | Praha / Prague, CZ | Rust Prague
- 2024-01-17 | Zurich, CH | Rust Zurich
- 2024-01-23 | Aarhus, DK | Rust Aarhus
North America
- 2024-01-06 | Boston, MA, US | Boston Rust Meetup
- 2024-01-08 | Chicago, IL, US | Deep Dish Rust
- 2024-01-09 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
- 2024-01-09 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2024-01-09 | New York, NY, US | Rust NYC
- 2024-01-14 | Cambridge, MA, US | Boston Rust Meetup
- 2024-01-16 | San Francisco, CA, US | San Francisco Rust Study Group
- 2024-01-17 | Chicago, IL, US | Deep Dish Rust
- 2024-01-18 | Seattle, WA, US | Seattle Rust User Group
- 2024-01-22 | Boston, MA, US | Boston Rust Meetup
- 2024-01-24 | Austin, TX, US | Rust ATX
- 2024-01-30 | Cambridge, MA, US | Boston Rust Meetup
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
Some people don't believe in life after death... Rust doesn't believe in magic after compilation.
– Stephan Sokolow on rust-users
Thanks to Todd Fleming 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