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
Project/Tooling Updates
- What’s New in IntelliJ Rust for 2022.1
- rust-analyzer changelog #130
- Fornjot (code-first CAD in Rust) - Weekly Dev Log - 2022-W20
- Slint (UI crate) weekly update
- Apache Arrow has released version 8.0.0 of the DataFusion in-process SQL query engine
- Redust: a new Redis client
- [libblendinfo] Return information from Rust crate to C library
- This week in Databend #43: A Modern Cloud Data Warehouse for Everyone
- This week in Fluvio #34: the programmable streaming platform
Observations/Thoughts
- Rust: A Critical Retrospective
- Building a Cloud Database from Scratch: Why We Moved from C++ to Rust
- How we use Rust, SQLx and Rocket for Oso Cloud
- Fixing Memory Leaks in Rust
- Crash Reporting in Rust
- Rust Environment and Docker Build with Nix Flakes
- BonsaiDb performance update: A deep-dive on file synchronization
- Rust Docker Tutorial
Rust Walkthroughs
- Optimizing the size of your Rust binaries
- Testing and building your Rust project with GitHub Actions
- Rust-raspberrypi-OS-tutorials: Tutorial 19 - Kernel Heap
- [video] Deref and Drop Traits
Miscellaneous
- Developer survey: JavaScript and Python reign, but Rust is rising
- [DE] Programmiersprache Rust 1.61 kann Programme aussagekräftig beenden
Crate of the Week
This week's crate is rustdoc-types, a crate with types to deserialize Rustdoc's JSON output.
Thanks to Nixon Enraght-Moony for the self-ish 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
363 pull requests were merged in the last week
- recover when resolution did not resolve lifetimes
- add new lint to enforce whitespace after keywords
- lint single-use lifetimes during AST resolution
- fix misleading "cannot infer type for type parameter" error
- improve
u32 as char
cast diagnostic - suggest dereferencing non-lval mutable reference on assignment
- add a query for checking whether a function is an intrinsic
- types with reachable constructors are reachable
- miri: adjust diagnostics assertion so we don't ICE in setup
- miri: initial work on Miri permissive-exposed-provenance
- miri: make
allow_data_races_*
public and use it duringEnvVars::cleanup
- remove quadratic behaviour from
-Zunpretty=hir-tree
- clean up derived obligation creation
- correctly deal with user type ascriptions in pat
- rustc_parse: move AST ->
TokenStream
conversion logic torustc_ast
- stabilize
Ipv6Addr::to_ipv4_mapped
- stabilize
array_from_fn
- add convenience byte offset/check align functions to pointers
- add functions to un-poison
Mutex
andRwLock
- improve codegen of
String::retain
method - change
NonNull::as_uninit_*
to take self by value (as opposed to reference), matching primitive pointers - remove unneeded null pointer asserts in
ptr2int
casts - make
ptr::invalid
not the same as a regularint2ptr
cast - use pointers in
cell::{Ref,RefMut}
to avoidnoalias
- portable SIMD: add
Mask::cast
- backtrace: make Miri backtraces work with
#[global_allocator]
- hashbrown: add function for getting access to map
table: RawTable<(K, V), A>
field - cargo: add unstable
rustc-check-cfg
build script output - cargo: restore proper error for crate not in local reg
- rustdoc: reduce
clean::Type
size - rustdoc: resolve some more doc links early 2
- rustfmt: import_granularity: Don't normalize imports with comments
- clippy: fix
cmp_owned
on copy types - clippy: improve "unknown field" error messages
- clippy: lint indirect usages in
disallowed_methods
- clippy:
dbg_macro
tolerates use ofdbg!
in test items - clippy: add suggestions to
rc_clone_in_vec_init
- rust-analyzer: fix inference when pattern matching a tuple field with a wildcard
- rust-analyzer: generate enum variant assist
- rust-analyzer: add "cargo clippy" task preset
- rust-analyzer: implement inlay hint tooltips
- rust-analyzer: improve docs generation assist
- rust-analyzer: add a "Add attribute" assist
- rust-analyzer: don't swallow build script errors
- rust-analyzer: fix broken async callback in join lines
- rustup: don't send logging to stdout
Rust Compiler Performance Triage
Overall a positive week for non-incremental performance (roughly 0.5% faster), however, some >1% regressions on multiple incremental benchmarks, primarily due to #95563, which will hopefully be investigated in the coming weeks.
Triage done by @simulacrum. Revision range: 7355d971..43d9f3
2 Regressions, 5 Improvements, 4 Mixed; 0 of them in rollups 57 artifact comparisons made in total
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.
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] Modify MIR building to drop repeat expressions with length zero
- [disposition: merge] Tracking Issue for
{array, slice}::{from_ref, from_mut}
as const fn - [disposition: merge] Remove migrate borrowck mode
- [disposition: merge] Remove label/lifetime shadowing warnings
- [disposition: merge] Stabilize the bundle native library modifier
New and Updated RFCs
- [new] RFC: Add more support for fallible allocations in Vec
- [notice] Mention RFC 1201 was superseded by RFC 2972
- [new] RFC: Add a scalable representation to allow support for scalable vectors
- [new] Macro Shorthand: Make m!123 identical to m!(123)
Upcoming Events
Rusty Events between 2022-05-25 - 2022-06-22 🦀
Virtual
- 2022-05-25 | Stuttgart, DE | Rust Community Stuttgart
- 2022-05-26 | Linz, AT | Rust Linz
- 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 | Dublin, IE | Rust Dublin
- 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
- 2022-06-21 | Washington, DC, US | Rust DC
North America
- 2022-05-25 | New York, NY, US | Rust NYC
- 2022-05-31 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2022-06-01 | Austin, TX, US | Rust ATX
- 2022-06-08 | Atlanta, GA, US | Rust ATL
- 2022-06-09 | Columbus, OH, US | Columbus Rust Society
- 2022-06-21 | San Francisco, CA, US | San Francisco Rust Study Group
Europe
- 2022-05-30 | London, UK | Rust London User Group
- 2022-05-31 | Rome, IT | Rust Roma
- 2022-06-09 | Oslo, NO | Rust Oslo
Oceania
- 2022-05-26 | Brisbane City, QL, AU | Rust Brisbane
- 2022-06-17 | Melbourne, VI, AU | Rust Melbourne
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
Element
Kidsloop
SixtyFPS GmbH
Bionaut Labs
Stockly
- Back-end developer - Engine (Rust, gRPC, PostgreSQL) (Paris, FR)
- Back-end developer (Rust, gRPC, PostgreSQL) (Paris, FR)
Tempus Ex
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
This is the difference in approaches of the two languages. In C++ if the code is vulnerable, the blame is on the programmer. In Rust if the code is vulnerable, Rust considers it a failure of the language, and takes responsibility to stop even “bad” programmers from writing vulnerable code. I can’t stress enough how awesome it is that I can be a careless fool, and still write perfectly robust highly multi-threaded code that never crashes.
– kornel on lobste.rs (with a caveat from ZiCog that Rust does not guarantee freedom from all vulnerabilities!)
Thanks to Brian Kung 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