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
Newsletters
Project/Tooling Updates
- rust-analyzer changelog #129
- IntelliJ Rust Changelog #170
- What's new in SeaORM 0.8.0
- Fornjot (code-first CAD in Rust) - Weekly Dev Log - 2022-W19
- Introducing BlindAI, an open-source privacy-friendly AI deployment in Rust
- Slint (UI crate) weekly update -- Version 0.2.4 Release
- This week in Databend #41: A Modern Cloud Data Warehouse for Everyone
- This week in Databend #42: A Modern Cloud Data Warehouse for Everyone
- Fyrox 0.25 Feature Highlights
Observations/Thoughts
- Things Are Getting Rusty In Kernel Land
- A new impl Trait
- Our Experience Porting the YJIT Ruby Compiler to Rust
- Comparing Rust supply chain safety tools
- Supply Chain Thoughts
- Can you have too many programming language features?
- Asteracea (platform-agnostic mixed-style frontend components)
- PixelBox Public Alpha
- [video] Building a Postgres storage system in Rust
- [video] Rust: Your code can be perfect
- [video] Systems Programmers Can Have Nice Things
- [video] The Rust Borrow Checker - a Deep Dive
- [audio] Slint with Tobias Hunger
Rust Walkthroughs
- Extending SQLite with Rust
- Let's talk about this async
- Bitsquatting attacks and exploit in Rust
- Building a crawler in Rust: Scraping Javascript Single Page Applications (SPA) with a headless browser
- Learning Rust - creating a full-text search engine
- Compiler Adventures, part 3: Value Numbering
- Do not wait for Rust generators
- Rust Ergonomics: Default and From
- Audio Libraries Considered Challenging
- Linking Rust Crates, Part 1
- A Guided Tour of Streams in Rust
- [video] Rust Bevy 0.7 - Full Tutorial - Game Development with Rust
Research
Miscellaneous
Crate of the Week
This week's crate is cargo-supply-chain, a cargo subcommand to gather author, contributor and publisher data on crates in your dependency graph.
Despite a lack of nominations, llogiq is pleased with his choice.
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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
341 pull requests were merged in the last week
- Add
EarlyBinder
- rustc: Stricter checking for
#[link]
attributes - Detect trait fulfillment in
subst_and_check_impossible_predicates
- Gracefully fail to resolve associated items instead of
delay_span_bug
- Stop suggesting non-existing fully qualified paths
- Implement a lint to warn about unused macro rules
- Check hidden types for well formedness at the definition site instead of only at the opaque type itself
- Drop tracking: handle invalid assignments better
- Forbid nested opaque types to reference HRTB from opaque types
- Don't subst an
AdtDef
with its own substs - miri: Add a command line flag to avoid printing to stdout and stderr
- miri: Print spans where tags are created and invalidated
- miri: Use atomic RMW for
{mutex, rwlock, cond, srwlock}_get_or_create_id
functions - Initial work on Miri permissive-exposed-provenance
- Use
FxIndexSet
to avoid sorting fake borrows - make sure
ScalarPair
enums haveScalarPair
variants; add some layout sanity checks - optimize
insert_range
method ofIntervalSet
- Make
BorrowedFd::borrow_raw
a const fn ExitCode::exit_process()
method- Fix
array::IntoIter::fold
to use the optimizedRange::fold
- futures: Make
run_until_stalled
handle self-waking futures - futures: Remove TryStreamExt::into_async_read Unpin bound
- cargo: Pass
--target
torustdoc
forcargo test
if specified with host target - cargo install: Support
foo@version
like cargo-add - cargo yank: Support foo@version like cargo-add
- rustdoc: correct path to type alias methods
- rustdoc: search result ranking fix
- clippy: Add
duplicate_mod
lint - clippy: Add version filtering option to the lint list
- clippy: Don't lint
vec_init_then_push
when further extended - clippy: Fix ICE in
let_unit_value
when calling a static or const callable type - clippy: Fix
match_single_binding
suggestion for assign expressions - clippy: Fix
redundant_allocation
warning forRc<Box<str>>
- clippy: New lint:
derive_partial_eq_without_eq
- clippy: Rename
eval_order_dependence
tomixed_read_write_expression
, move to nursery - clippy:
undocumented_unsafe_blocks
does not trigger on unsafe trait impls - clippy: introduce
rc_clone_in_vec_init
lint - rust-analyzer: Config revamp
- rust-analyzer: Add binding mode inlay hints
- rust-analyzer: Allow reborrow inlay hints to be restricted to mutable reborrows only
- rust-analyzer: Change VSCode extension publisher to
rust-lang
- rust-analyzer: Handle getters and setters in documentation template assist
- rust-analyzer: Improve "Generate
Deref
impl" assist - rust-analyzer: Show inlay hints after a
}
to indicate the closed item - rust-analyzer: Support variable substitution in VSCode settings
- rust-analyzer: include associated types in trait signature help
- rust-analyzer: Add cast expressions to param name inlay hint heuristics
- rust-analyzer: Fix config patching failing when appending suffixes
- rust-analyzer: Fix fill-arguments completions not working
- rust-analyzer: Fix incorrect hover actions config keys
- rust-analyzer: Fix old config patching overwriting callable snippet config unconditionally
- rust-analyzer: don't panic at fully qualified call syntax in signature help
- rust-analyzer: insert whitespace between 'mut' and 'self' in macro expansion
Rust Compiler Performance Triage
It was a somewhat quiet week with real-world benchmarks showing a slight improvement on average and only one real-world crate, bitmaps
, experiencing regressions. Unfortunately, the cause of the regressions don't look straightforward though. The biggest performance win came from a change to not encode attributes in metadata that are only used within the local crate. This improved doc builds of 16 of the 18 real world crates we run in our performance suite!
Triage done by @rylev. Revision range: c51871..7355d
Summary:
Regressions 😿 (primary) |
Regressions 😿 (secondary) |
Improvements 🎉 (primary) |
Improvements 🎉 (secondary) |
All 😿 🎉 (primary) |
|
---|---|---|---|---|---|
count | 7 | 9 | 40 | 43 | 47 |
mean | 1.6% | 2.6% | -0.6% | -1.3% | -0.3% |
max | 1.9% | 3.5% | -2.6% | -2.6% | -2.6% |
2 Regressions, 4 Improvements, 0 Mixed; 0 of them in rollups 51 artifact comparisons made in total
See the full report for more.
Call for Testing (New!)
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:
- RFC: Deduplicate Cargo workspace information
- Tracking Issue for scoped threads
- RFC: Packages as (optional) namespaces
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.
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
- [disposition: merge] Create a types team
Tracking Issues & PRs
- [disposition: merge] Neither require nor imply lifetime bounds on opaque type for well formedness
- [disposition: merge] impl Read and Write for
VecDeque<u8>
- [disposition: merge] Tracking Issue for
int_roundings
New and Updated RFCs
- [new] RFC: Rust SemVer 2
Upcoming Events
Rusty Events between 2022-05-18 - 2022-06-15 🦀
Virtual
- 2022-05-18 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-05-18 | Vancouver, BC, CA | Vancouver Rust
- 2022-05-24 | Berlin, DE | OpenTechSchool Berlin & Berline.rs
- 2022-05-24 | Hyderbad, IN | Rust Language Hyderbad
- 2022-05-24 | San Francisco, CA, US | Rust Bay Area
- 2022-05-25 | Stuttgart, DE | Rust Community Stuttgart
- 2022-05-31 | Dallas, TX, US | Dallas Rust
- 2022-06-01 | Indianapolis, IN, US | Indy Rust
- 2022-06-01 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-06-07 | Beijing, CN | WebAssembly and Rust Meetup (Rustlang)
- 2022-06-07 | Buffalo, NY, US | Buffalo Rust Meetup
- 2022-06-08 | Boulder, CO, US | Boulder Elixir and Rust
- 2022-06-09 | Nürnberg, DE | Rust Nurnberg DE
- 2022-06-09 | San Diego, CA, US | San Diego Rust
- 2022-06-09 | Stuttgart, DE | Rust Community Stuttgart
- 2022-06-14 | Dallas, TX, US | Dallas Rust
- 2022-06-15 | Philadelphia, PA, US | Rust Philly (Rust Philadelphia)
- 2022-06-15 | Vancouver, BC, CA | Vancouver Rust
North America
- 2022-05-24 | San Francisco, CA, US | Rust Bay Area
- 2022-05-25 | New York, NY, US | Rust NYC
- 2022-06-08 | Atlanta, GA, US | Rust ATL
- 2022-06-09 | Columbus, OH, US | Columbus Rust Society
Europe
- 2022-05-18 | Stockholm, SE | Stockholm Rust
- 2022-05-19 & 05-20 | Berlin, DE | Entwickler.de
- 2022-05-24 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2022-05-30 | London, UK | Rust London User Group
- 2022-05-31 | Rome, IT | Rust Roma
Oceania
- 2022-05-26 | Brisbane City, QL | Rust Brisbane
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
Disney
StructionSite
Clear
Audiotool
Anixe
Instant Domains
Spire Global
Enso
Stockly
- Back-end developer - Engine (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer (Rust, gRPC, PostgreSQL) (Paris, FR)
Kraken
- Engineering Manager - Rust - Core Backend (Remote)
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
Estuary
- Developer Evangelist (New York, NY, US, Columbus, OH, US, Remote)
- Senior Backend Engineer (New York, NY, US, Columbus, OH, US, Remote)
- Backend Engineer (New York, NY, US, Columbus, OH, US, Remote)
Parity
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
It is worth remembering that there is an infinitely large set of programs but a very small set of useful programs. A programming language is a form of ad-hoc compression algorithm, it is intended to sort the set of useful programs to have shorter encodings than the undesirable ones. Programs with certain categories of error or security vulnerability should be harder or impossible to express.
Thanks to Anton Fetisov 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