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? Tweet us at @ThisWeekInRust 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
Newsletters
Project/Tooling Updates
- Fornjot (Code-CAD in Rust) - Weekly Dev Log - 2022-W09
- This week in Fluvio #24: the programmable streaming platform
- This Month in Rust OSDev: February 2022 | Rust OSDev
- IntelliJ Rust Changelog #166
- Rust-Analyzer Changelog #119
- This week in Databend #32: A Modern Cloud Data Warehouse for Everyone
- [DE] WebAssembly-Runtime: Wasmer 2.2 liefert mehr Leistung im Singlepass Compiler
Observations/Thoughts
- Safe Pin projections through view types
- Improving Criterion.rs
- Request coalescing in async Rust
- Hyper’s Vision
- Introduction - Effective Rust
Rust Walkthroughs
- Functional Programming in Rust
- Fuzzing unsafe code in a Rust crate
- Mint tokens on Solana using the Rust SDK
- Implementing a size-bounded LRU cache with expiring entries for my DNS server (in Rust)
- [series] [video] Writing a Programming Language (in Rust) 20: Laurel: Porting a bash script to Laurel
- [series] [video] Writing a Programming Language (in Rust) 21: Laurel: Type methods
Miscellaneous
- SAE seeking volunteers for SAfEr Rust Task Force
- [audio] What's New in Rust 1.58 and 1.59 :: Rustacean Station
- [audio] Tor with Nick Mathewson :: Rustacean Station
- [video] Implementing and Optimizing a Wordle Solver in Rust
Crate of the Week
This week's crate is cfb, a crate to read/write Compound File Binary (structured storage) files.
Thanks to Sebastian Urban for the suggestion!
Please submit your suggestions and votes for next week!
Call for Participation
Always wanted to contribute to open-source projects but didn't 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.
- rust - Firefox crashes on Windows 7 x86 because BCryptGenRandom fails
- rust-clippy - invert check for
clippy::try_err
and disable it inside of try blocks - ribzip2 - Write an interface compatible to the bzip2 crate
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
343 pull requests were merged in the last week
- implement thread local cell methods (RFC #3184)
- implement the
expect
attribute (RFC #2383) Adt
copy suggestions- do not point at whole file missing
fn main
- downgrade
#[test]
on macro call to warning - generalize "remove
&
" and "add*
" suggestions to more than one deref - lint against more useless
#[must_use]
attributes - improve
unexpected_cfgs
lint when their is no value expected - improve allowness of the
unexpected_cfgs
lint - improve error message for failed bitcode load
- suggest adding a new lifetime parameter when two elided lifetimes should match up for traits and impls
- suggest removing a semicolon after derive attributes
- caching the stable hash of Ty within itself
- clarify
Layout
interning - introduce
ConstAllocation
- chalk: recursive: fix hang on fulfill by slightly smarter check for progress
- miri: make sure we notice when a u16 is loaded at offset 1 into a u8 allocation
- miri: add more simd_reduce intrinsics
- miri: adjust for div/rem overflow being UB
- miri: also test f32/f64 simd_reduce
- miri: implement missing SIMD comparison operators, simd_xor, and simd_reduce_all
- miri: implement more SIMD intrinsics
- miri: implement simd_neg and simd_fabs
- miri: implement simd_saturating intrinsics
- stabilize
const_fn_fn_ptr_basics
,const_fn_trait_bound
, andconst_impl_trait
- add
#[track_caller]
to track callers when initializing poisonedOnce
- add
Atomic*::from_mut_slice
- portable SIMD: add bitmask i{N <8} -> u8 impls
- futures:
Shared
: fix false detection of inner panics - support GATs in Rustdoc
- rustfmt: fix missing struct field separators under certain conditions
- rustfmt: prevent wrapping markdown headers in doc comments
- rustfmt: fallback to dir_path when relative external mod resolution fails
- clippy: add
unnecessary-find-map
lint - clippy: add lint to detect
allow
attributes without reason - clippy: lint for casting between raw slice pointers with different element sizes
- clippy: new lint:
missing-spin-loop
- clippy: use
.into_iter()
rather than.drain(..)
- clippy: check
use_self
inpat
- clippy: omit
dbg-macro
in test code - clippy: optimize
redundant-clone
- clippy:
transmute-undefined-repr
to nursery again
Rust Compiler Performance Triage
A pretty smooth week. All three regressions were small, and two were isolated to rustdoc alone.
Triage done by @pnkfelix. Revision range: f0c4da49..10dccdc7
3 Regressions, 3 Improvements, 1 Mixed; 2 of them in rollups 53 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 new or updated RFCs were submitted 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
- [disposition: merge] Cargo alternative registry auth
Tracking Issues & PRs
- [disposition: merge] Consistently present absent stdio handles on Windows as NULL handles.
- [disposition: merge] Stabilize ADX target feature
- [disposition: merge] proc-macro: Stop wrapping ident matchers into groups
- [disposition: merge] Tracking Issue for RFC #2972: Constrained Naked Functions
New and Updated RFCs
- [new] Edition Based Method Disambiguation: Preventing inference ambiguity breakages with extension trait methods
- [update RFC #2991] RFC: Add target configuration
Upcoming Events
Rusty Events between 2022-03-09 - 2022-04-06 🦀
Virtual
- 2022-03-09 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-03-09 | Egg Harbor City, NJ, US | Neighborhood Math Club
- 2022-03-09 | München, DE | Rust Munich
- 2022-03-09 | Selangor, MY | Rust Malaysia
- 2022-03-09 | Stuttgart, DE | Rust Community Stuttgart
- 2022-03-10 | Charlottesville, VA, US | Charlottesville Rust Meetup
- 2022-03-15 | Berlin, DE | OpenTechSchool Berlin
- 2022-03-15 | Dublin, IE | Rust Dublin
- 2022-03-15 | Rome, IT | Rust-Roma
- 2022-03-15 | Washington, DC, US | Rust DC
- 2022-03-16 | Egg Harbor City, NJ, US | Neighborhood Math Club
- 2022-03-16 | Seattle, WA, US | Seattle Rust Meetup
- 2022-03-16 | Vancouver, BC, CA | Vancouver Rust
- 2022-03-23 | Egg Harbor City, NJ, US | Neighborhood Math Club
- 2022-04-05 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-04-06 | Indianapolis, IN, US | Indy Rust
Europe
- 2022-03-13 | Kyiv, UA | Вивчаємо Rust Разом / Learn Rust Together *Ukrainian Rusty Dinner
- 2022-03-15 | Sofia, BG | Rust Meetup Sofia
North America
- 2022-03-14 | Atlanta, GA, US | Atlanta Rustaceans
- 2022-03-15 | San Francisco, CA, US | San Francisco Rust Study 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.
Rust Jobs
Meilisearch
LoanPASS
Komodo
Estuary
Matician
Quickwit
- Senior Software Engineer, Rust & distributed systems - Rust (Remote)
- Software search engineering intern - Rust (Remote)
Kollider
Stockly
- Back-end developer - TechOps (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer - Engine (Rust, gRPC, PostgreSQL) (Paris, FR)
Kraken
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
- Rust Engineer - Banking (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Because it is designed not to own. If you need an owning pointer, use Box.
This is like asking "why there is no chocolate mousse in this burger?". Chocolate mousse is delicious, but it does not belong in a burger. If you want chocolate mousse, then that's fine and you can choose to eat it instead of a burger. But at other times you may want a burger instead.
– H2CO3 answering why raw pointers don't own on rust-users
Thanks to Deep Majumder 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.
Email list hosting is sponsored by The Rust Foundation