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
Foundation
Project/Tooling Updates
- cargo careful: run your Rust code with extra careful debug checking
- Async UI: a Rust UI Library where Everything is a Future
- rust-analyzer changelog #149
Observations/Thoughts
- How (and why) nextest uses tokio, part 1
- in-place constructors
- Quirks of Rust’s token representation
- Brute forcing protected ZIP archives in Rust
- This week in Fluvio #47: The programmable streaming platform
Rust Walkthroughs
- How to call a C function from Rust (A simple FFI tutorial)
- Rewriting the Modern Web in Rust
- Implementing truly safe semaphores in rust
- Model an ALU in Rust
- 6 things you can do with the Cow 🐄 in Rust 🦀
- Platform Agnostic Drivers in Rust: MAX7219 Naive Code Refactoring
- Last mile DynamoDB: Deno Deploy edition
Miscellaneous
Crate of the Week
This week's crate is humansize, a size formatting crate. Now in version 2.0, with an updated API.
Thanks, Leopold Arkham 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.
- AeroRust website - Add an aerospace related crate #Hacktoberfest
- nmea - Supporting additional sentences #Hacktoberfest
- AeroRust website - Request for content
- zerocopy - test_new_error fails on i686
- zerocopy - test_as_bytes_methods fails on powerpc
- zerocopy - Miri can't run tests for wasm32-wasi target
- Ockam - Prototype UDP NAT hole punching
- Ockam - Refactor ockam secure-channel listener create command to use rpc
- Ockam - Split CBOR / Messaging API schema.cddl
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
367 pull requests were merged in the last week
- libc: add major/minor/makedev on apple OSes
- miri: Add flag to specify the number of cpus
- cargo: Iteratively construct target cfg
- rustdoc-Json: List impls for primitives
- clippy: Implement
manual_clamp
lint - clippy: Silence [
question_mark
] in const context - clippy: [
manual_assert
]: Preserve comments in the suggestion - clippy: [
unnecessary_lazy_evaluations
] Do not suggest switching to early evaluation when type has customDrop
- clippy: add
box-default
lint - clippy: fix [
needless_borrow
], [explicit_auto_deref
] FPs on unions - clippy: let
upper_case_acronyms
check the enum name - clippy: let unnecessary_cast work for trivial non_literal expressions
- clippy: lint nested patterns and slice patterns in
needless_borrowed_reference
- clippy: new
implicit_saturating_add
lint - rust-analyzer: Add proc-macro dependency to rustc crates
- rust-analyzer: Fix PackageInformation having the crate name instead of package name
- rust-analyzer: Fix annotations not resolving when lens location is set to whole item
- rust-analyzer: Fix find_path using the wrong module for visibility calculations
- rust-analyzer: Fix move_format_string_arg being tokentree unaware
- rust-analyzer: Fix requests not being retried anymore
- rust-analyzer: Fix trait impl item completions using macro file text ranges
- rust-analyzer: Fix type alias hovers not rendering generic parameters
- rust-analyzer: Use cfg(any()) instead of cfg(FALSE) for disabling proc-macro test
- ci: Replace
volta-cli/action
with builtin functionality fromactions/setup-node
- docs.rs: new cache-policy & cache middleware structure to support full page caching
- add
#[rustc_safe_intrinsic]
- add a niche to
Duration
, unixSystemTime
, and non-appleInstant
- add diagnostic struct for const eval error in
rustc_middle
- add negation methods for signed non-zero integers
- added more const_closure functionality
- adjust the s390x data layout for LLVM 16
- compute lint levels by definition
- fix
#[derive(Default)]
on a generic#[default]
enum adding unnecessaryDefault
bounds - fix
format_args
capture for macro expanded format strings - fix associated type bindings with anon const in GAT position
- fix integer overflow in
format!("{:.0?}", Duration::MAX)
- generate synthetic region from
impl
even in closure body within an associated fn - get rid of exclude-list for Windows-only tests
- serialize return-position
impl Trait
in trait hidden values in foreign libraries - stabilize
#![feature(mixed_integer_ops)]
- stabilize bench_black_box
- use let-chaining in
WhileTrue::check_expr
- introduce
{char, u8}::is_ascii_octdigit
- macros: diagnostic derive on enums
- add a filter for try commits in graphs, compare page and triage
- codegen_gcc: Implement llvm.prefetch
- codegen_gcc: simd: enable simd_as intrinsic
- codegen_gcc: simd: implement float math intrinsics
- allow users to debug their processes
Rust Compiler Performance Triage
A great week, with 170 primary benchmark scenarios seeing improvement. Every PR flagged by perf provided at least some wins, and perhaps more impressive: No rollup PR's were flagged by perf this week! Furthermore, cjgillot fixed an issue where incremental compilation was being unnecessarily hindered by our span and lint system. Great work everyone!
Triage done by @pnkfelix. Revision range: d9297d22..02cd79af
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] make const_err a hard error
- [disposition: merge] Elaborate supertrait bounds when triggering unused_
must_use
onimpl Trait
- [disposition: merge] Stabilize proc_macro Span::source_text
- [disposition: merge]
const
-stablilizeNonNull::as_ref
- [disposition: merge] Add documentation about the memory layout of
UnsafeCell<T>
- [disposition: merge] Handle projections as uncovered types during coherence check
- [disposition: merge] Never panic in
thread::park
andthread::park_timeout
- [disposition: merge] Stabilize
nonzero_bits
- [disposition: merge]
EscapeAscii
is not anExactSizeIterator
- [disposition: merge] Change default level of INVALID_HTML_TAGS to warning and stabilize it
- [disposition: merge] Add
Box<[T; N]>: TryFrom<Vec<T>>
- [disposition: merge] add
no_compile
doctest attribute
New and Updated RFCs
- No New or Updated RFCs were created this week.
Upcoming Events
Rusty Events between 2022-10-05 - 2022-11-02 🦀
Virtual
- 2022-10-05 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-10-05 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-10-06 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-10-08 | Virtual | Rust GameDev
- 2022-10-11 | Virtual (Berlin, DE) | Open TechSchool Berlin
- 2022-10-11 | Virtual (Dallas, TX, US) | Dallas Rust
- 2022-10-11 | Virtual (Saarbrücken, DE) | Rust-Saar
- 2022-10-11 | Virtual (Weiden, DE) | Digital Craftsmanship Nordoberpfalz
- 2022-10-12 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust
- 2022-10-12 | Virtual (Erlangen, DE) | Rust Franken
- 2022-10-12 | Virtual (San Francisco, CA, US / Redmond, WA, US / London, UK) | Microsoft Reactor San Francisco
- 2022-10-13 | Virtual (Berlin, DE) | EuroRust
- 2022-10-15 | Virtual (Nürnberg, DE) | Rust Nuremberg
- 2022-10-18 | Virtual (Washington, DC, US) | Rust DC
- 2022-10-19 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2022-10-20 | Virtual (Stuttgart, DE) | Rust Community Stuttgart
- 2022-10-25 | Virtual (Dallas, TX, US) | Dallas Rust
- 2022-10-26 | Virtual (Redmond, WA, US) | Microsoft Reactor Redmond
- 2022-10-27 | Virtual (Charlottesville, VA, US) | Charlottesville Rust Meetup
- 2022-11-01 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 2022-11-02 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2022-11-02 | Virtual (Redmond, WA, US / San Francisco, SF, US) | Microsoft Reactor Redmond
Asia
- 2022-10-11 | Tokyo, JP | Tokyo Rust Meetup
Europe
- 2022-10-06 | Wrocław, PL | Rust Wrocław
- 2022-10-12 | Berlin, DE | Rust Berlin
- 2022-10-13 | Berlin, DE + Virtual | EuroRust
- 2022-10-25 | Paris, FR | Rust Paris
North America
- 2022-10-13 | Columbus, OH, US | Columbus Rust Society
- 2022-10-18 | San Francisco, CA, US | San Francisco Rust Study Group
- 2022-10-20 | New York, NY, US | Rust NYC
- 2022-10-20 | New York, NY, US | Cloud Native New York
- 2022-10-25 | Toronto, ON, CA | Rust Toronto
- 2022-10-27 | Lehi, UT, US | Utah Rust
Oceania
- 2022-10-10 | Sydney, NSW, AU | Rust Sydney
- 2022-10-20 | Wellington, NZ + Virtual | Rust Wellington
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
BurntSushi is a super experienced programmer who always seems to know what’s right
Shepmaster occasionally pops up to keep things level, and provides definitive answers and edits to all stackoverflow questions
Epage is the ecosystem guy thanklessly maintaining the things that make the magic of cargo possible
Dtolnay is an AI written in rust with the sole purpose of improving rust.
Thanks to musicmatze 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