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
- rust-analyzer - changelog #148
- IntelliJ Rust Changelog #179
- Announcing
async-dns
- Fornjot - Weekly Release - 2022-W39
- gitoxide - August: Useful rev-spec parsing and an abstraction for remotes
- Getting Started with Seaography - A GraphQL framework for SeaORM
Observations/Thoughts
- Internship Projects 2022: Concrete Playback
- Why Volvo thinks you should have Rust in your car
- Linux embracing Rust will boost robotics community
- Better Java logging, inspired by Clojure and Rust
- Why Async Rust
- Apache APISIX loves Rust! (and me too)
- Safe pinned initialization
- Enabling Rapid Pulumi Prototyping with Rust
- STM32F4 Embedded Rust at the HAL: SPI with the MAX7219 LED Dot Matrix
- [audio] Rustacean Station: Ockam with Mrinal Wadhwa
Rust Walkthroughs
- Building a Real-Time Web Cipher with Rust, Sycamore and Trunk
- Dyn async traits, part 9: call-site selection
- Rust 2024...the year of everywhere?
- Building Nix flakes from Rust workspaces
- Accessing Firebird With Diesel and Rust
- Multithreading in Rust
- Flutter and Rust combined
Miscellaneous
- [DE] CTO von MS Azure: Nehmt Rust für neue Projekte und erklärt C/C++ für überholt!
- [DE] Rust Foundation erhält 460.000 US-Dollar und gründet ein Team für Security
- [DE] Programmiersprache Rust 1.64 erweitert asynchrone Programmierung mit IntoFuture
- [video] Rust & Wasm (Safe and fast web development)
- [video] Crust of Rust: Build Scripts and Foreign-Function Interfaces (FFI)
- [video] Bevy Basics Reflect
Crate of the Week
This week's crate is serde-transcode, a crate to efficiently convert between various serde-supporting formats
Thanks to Kornel 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.
- zerocopy - Test more conditions in GitHub actions
- pw-sys - help with CI for one of diesel's dependencies
- Ockam - Improve CowStr Display
- Ockam - https://github.com/build-trust/ockam/issues/3507
- Ockam - Refactor NodeManager constructor
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
347 pull requests were merged in the last week
- add armv5te-none-eabi and thumbv5te-none-eabi targets
- compiler-builtins: enable floating point intrinsics for RISCV32 microcontrollers
- rustc_transmute: fix big-endian discriminants
- allow
~const
bounds on non-const functions - allow specializing on const trait bounds
- recover from struct nested in struct
- recover some items that expect braces and don't take semicolons
- make cycle errors recoverable
- avoid panicking on missing fallback
- require
#[const_trait]
onTrait
forimpl const Trait
- resolve async fn signature even without body (e.g., in trait)
- diagnostics: avoid syntactically invalid suggestion in if conditionals
- add help for invalid inline argument
- suggest
Default::default()
when binding isn't initialized - improve error for when query is unsupported by crate
- improve the help message for an invalid calling convention
- look at move place's type when suggesting mutable reborrow
- note if mismatched types have a similar name
- note the type when unable to drop values in compile time
- miri: don't back up past the caller when looking for an FnEntry span
- interpret: expose
generate_stacktrace
without fullInterpCx
- inline
SyntaxContext
in both encoded span representation - introduce
mir::Unevaluated
- only generate closure def id for async fns with body
- use function pointers instead of macro-unrolled loops in
rustc_query_impl
- separate definitions and HIR owners in the type system
- use
partition_point
instead ofbinary_search
when looking up source lines - skip
Equate
relation inhandle_opaque_type
- calculate
ProjectionTy::trait_def_id
for return-positionimpl Trait
in trait correctly - manually cleanup token stream when macro expansion aborts
- neither require nor imply lifetime bounds on opaque type for well formedness
- normalize closure signature after construction
- normalize opaques with bound vars
- split out
async_fn_in_trait
into a separate feature - support overriding initial rustc and cargo paths
- use internal iteration in
Iterator
comparison methods alloc
: add unstable cfg featuresno_rc
andno_sync
- a fn pointer doesn't implement
Fn
/FnMut
/FnOnce
if its return type isn't sized - fix
ConstProp
handling ofwritten_only_inside_own_block_locals
- implied_bounds: deal with inference vars
- make
Condvar
,Mutex
,RwLock
const constructors work with theunsupported
impl - make projection bounds with const bounds satisfy const
- resolve: set effective visibilities for imports more precisely
- add option to deduplicate extern blocks
- codegen: implement manuallydrop fields better
- optimize
array::IntoIter
- std: use
sync::RwLock
for internal statics - stabilize const
BTree{Map,Set}::new
- constify
Default
impl's for Arrays and Tuples - constify
cmp_min_max_by
- constify
slice.split_at_mut
(_unchecked
) - add
const_closure
, constifyTry
trait - make
ManuallyDrop
satisfy~const Destruct
- make
from_waker
,waker
andfrom_raw
unstablyconst
- extend
const_convert
withconst
{FromResidual
,Try
} forControlFlow
- recover error strings on Unix
from_lossy_utf8
- cargo: add support for relative git submodule paths
- cargo: improve errors for TOML fields that support workspace inheritance
- cargo: report cmd aliasing failure with more contexts
- cargo: error trailing args rather than ignore
- cargo: forward non-UTF8 arguments to external subcommands
- cargo: make unknown features on
cargo add
more discoverable - rustdoc: stabilize --diagnostic-width
- bindgen: handle
no_return
attributes - bindgen: remove file added by mistake
- clippy: add
matches!
checking tononstandard_macro_braces
- clippy: fix ICE in
needless_pass_by_value
with unsizeddyn Fn
- clippy: fix ICE in
unnecessary_to_owned
- clippy: fix panic when displaying the backtrace of failing integration tests
- clippy: moved
derive_partial_eq_without_eq
to nursery - clippy:
never_loop
: fix FP withlet
..else
statements - clippy:
nonstandard_macro_braces
do not modify macro arguments - clippy: new
uninlined_format_args
lint to inline explicit arguments - clippy:
uninit_vec
: fix false positive withset_len(0)
- rust-analyzer: add assist to unwrap tuple declarations
- rust-analyzer: fix diagnostics not working in enum variant bodies
- rust-analyzer: fix operator highlighting tags applying too broadly
- rust-analyzer: properly set the enum variant body type from the repr attribute
- rust-analyzer: properly support IDE functionality in enum variants
- rust-analyzer: use the sysroot proc-macro server for analysis-stats
- rust-analyzer: display the value of enum variant on hover
- rust-analyzer: type inference for generators
Rust Compiler Performance Triage
Overall a fairly quiet week in terms of new changes; the majority of the delta this week was due to reverting #101620, which was a regression noted in last week's report.
Triage done by @simulacrum. Revision range: 8fd6d03e2..d9297d22
2 Regressions, 7 Improvements, 3 Mixed; 3 of them in rollups 53 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:
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] Allow transmutes between the same types after erasing lifetimes
- [disposition: merge] Add
AsFd
implementations for stdio lock types on WASI. - [disposition: merge] Tracking Issue for asm_sym
New and Updated RFCs
- [updated] Update RFC 2906 to match the implementation
- [new] RFC:
Aligned
trait - [new] RFC: Field projection
Upcoming Events
Rusty Events between 2022-09-28 - 2022-10-26 🦀
Virtual
- 2022-09-28 | Virtual (London, UK) | Rust London User Group
- 2022-09-30 | Virtual (Minneapolis, MN, US) | Minneapolis Rust Meetup
- 2022-10-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup
- 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 (Dallas, TX, US) | Dallas Rust
- 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) | 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
Asia
- 2022-10-11 | Tokyo, JP | Tokyo Rust Meetup
Europe
- 2022-09-28 | London, UK + Virtual | Rust London User Group
- 2022-09-29 | Amsterdam, NL | Rust Developers Amsterdam Group
- 2022-09-29 | Copenhagen, DK | Copenhagen Rust group
- 2022-09-29 | Enschede, NL | Dutch Rust Meetup
- 2022-09-30 | Berlin, DE | RustFi Hackathon
- 2022-10-02 | Florence, IT + Virtual | RustLab
- 2022-10-03 | Stockholm, SE | Stockholm Rust
- 2022-10-04 | Helsinki, FI | Finland Rust Meetup
- 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-18 | Paris, FR | Rust Paris
North America
- 2022-09-28 | Austin, TX, US | Rust ATX
- 2022-09-29 | Ciudad de México, MX | Rust MX
- 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-25 | Toronto, ON, CA | Rust Toronto
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
Semver has its philosophy, but a pragmatic approach to versioning is:
<upgrades may break API> . <downgrades may break API> . <fine either way>
Thanks to Artem Borisovskiy 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