Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. 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
No official blog posts or research papers this week.
Newsletters
Project/Tooling Updates
- rust-analyzer Changelog #79
- GCC Rust Monthly Report #6 May 2021
- This Week In TensorBase 5
- Announcing tower-http
- Turning rusty tech into Rust ~ When you need to FTP but don’t want to
Observations/Thoughts
- Object Oriented Programming Concepts in Rust
- My first cup of Rust
- Demystifying Mutability and References in Rust
- The simpler alternative to GCC-RS
- Why I support GCC-rs
- Taking Rust for a Test Drive
- A Polkadot Postmortem - 24.05.2021
- The Most Annoying Bug I've Had To Track Down
- [video] There and back again - Our Rust adoption journey [Open Source North 2021 / Luca Palmieri]
Rust Walkthroughs
- RESTful API in Sync & Async Rust
- Idiomatic Rust Binary Search Extended
- Tightness Driven Development in Rust
- Writing a "hello world" Riscv Kernel with Nix in Rust
- Rust for Fsharpers and F# for Rustaceans
- Creating a Deno plugin with Rust
- How to use the Firebird database with Rust language
- Reactive UI components in Rust
- Redis Streams in Action - Part 2 (Rust app to consume from the Twitter Streaming API)
- How to make plugins system with Rust and WebAssembly
- Getting started with ECS using Planck ECS
- Designing Rust bindings for REST APIs
- WebRTC Video chat tutorial using Rust+WASM
- [ZH] Take Web Screenshot & Make Watermark in Rust (Rust 中,对网址进行异步快照,并添加水印效果的实践)
- [video] A Firehose of Rust, for busy people who know some C++
Miscellaneous
Crate of the Week
This week's crate is rust-codegen-gcc, a drop-in replacement for the LLVM-based rust compiler backend targetting GCC.
Thanks to Josh Triplett for the nomination
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 Rust Core
255 pull requests were merged in the last week
- post-monomorphization errors traces MVP
- make closures inherit their parent's "safety context"
- fix low-memory issue and lower tier platforms with no sysinfo
- fix bootstrap using host exe suffix for cargo
- const-eval: disallow unwinding across functions that !fn_can_unwind()
- deal with const_evaluatable_checked in ConstEquate
- disallow shadowing const parameters
- optimize proc macro bridge
- fix incorrect suggestions for E0605
- stabilize member constraints
- E0599 suggestions and elision of generic argument if no canditate is found
- a bit more polish on const eval errors
- merge CrateDisambiguator into StableCrateId
- do not try to build LLVM with Zlib on Windows
- use u64 for the GroupWord on WebAssembly
- don't hash
thir_body
- emit a hard error when a panic occurs during const-eval
- don't sort a Vec before computing its DepTrackingHash
- demote
ControlFlow::
{from
,into
}_try
topub(crate)
- remove
Ipv6Addr::is_unicast_link_local_strict
- make
Step
trait safe to implement - fix unsoundness of
Debug
implementation forlinked_list::IterMut
Weak
's type parameter may dangle ondrop
- add
TrustedRandomAccess
specialization forVec::extend()
- enable
Vec
's calloc optimization forOption<NonZero>
- prevent double
drop
inVec::dedup_by
if a destructor panics - fix pointer provenance in
<[T]>::copy_within
- add
String::extend_from_within
- add
inline
attr toCString::into_inner
so it can optimize outNonNull
checks - hashbrown: guard against allocations exceeding
isize::MAX
- futures: allow no limit for buffered stream combinators
- cargo:
cargo tree -e no-proc-macro
to hide procedural macro dependencies - rustup: bring back
x86_64-sun-solaris
target to rustup - clippy: add
avoid_breaking_exported_api
config option - clippy: add lint
suspicious_splitn
- clippy: move
semicolon_if_nothing_returned
topedantic
- clippy: improve message for
not_unsafe_ptr_arg_deref
lint - clippy: fix ICE in
too_many_lines
- clippy: fix
allow
on some statement lints - clippy: fix
missing_docs_in_private_items
false negative - clippy: add the ability to invalidate caches to force metadata collection
Rust Compiler Performance Triage
Busy week, with several reverted PRs due to performance regressions, but overall a positive week.
Triage done by @simulacrum. Revision range: cdbe288..1160cf8
3 Regressions, 3 Improvements, 5 Mixed
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] RFC: Supertrait item shadowing
- [disposition: merge] Type-changing struct update syntax
- [disposition: merge] RFC: Introduce concat_bytes!() to join [u8] and byte str analogous to concat! for str
- [disposition: merge] RFC: Overconstraining and omitting unsafe in impls of unsafe trait methods
Tracking Issues & PRs
- [disposition: merge] Re-add support for parsing (and pretty-printing) inner-attributes in match body
New RFCs
No new RFCs were proposed this week.
Upcoming Events
Online
- June 8, 2021, Seattle, WA, US - Monthly meetup - Seattle Rust Meetup
- June 10, 2021, Berlin, DE - Rust Hack and Learn - Berline.rs
- June 16, 2021, Vancouver, BC, CA - Rust in Mozilla's Data Platform - Vancouver Rust
- June 17, 2021, Denver, CO, US - Learning Rust as a Python/Javascript developer by Juhis - Rust Denver
North America
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
TrueLayer
Ockam
Tweede golf
Dedalus Healthcare
Yat Labs
Ubisoft
NZXT
Parity
- Junior/Senior Rust Solution Engineer - Substrate (Remote)
- Multiple Rust / Blockchain Engineering Positions Available
Kraken
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
I recently graduated with my Ph.D., after having worked on 5 different versions of my simulator, written in 4 different languages. The last version, written in pure, safe rust, worked correctly in part because of rust's strong guarantees about what 'safety' means, which I was able to leverage to turn what would normally be runtime errors into compile time errors. That let me catch errors that would normally be days or weeks of debugging into relatively simple corrections. [...] So, once again, thank you to everyone!
Thanks to Josh Triplett for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.