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
Official
- [Inside] 1.47.0 pre-release testing
- [Inside] 1.47.0 second pre-release testing
Newsletters
- This Month in Rust OSDev (September 2020)
- Rust in Blockchain Newsletter #16 - Secure Enclaves à la Crab
- This Month in Dimforge #1 (October 2020)
Tooling
Observations/Thoughts
- Why I scatter
use
statements throughout Rust code - Rust + Raspberry Pi Tide Clock
- You're Allowed To Write Slow Rust Code
- Rust meets the web - a clash of programming paradigms
- Dynamic widget sketches
- Results of Authoring a JS Library with Rust and Wasm
- Ringbahn III: A deeper dive into drivers
- Fast Thread Locals In Rust
- Formicarium
Learn Simple Rust
- Dancing Links In Rust
- Getting Started with the nRF52840 in Rust
- That's so Rust!: Smart pointers
- [video] Test-Based and Graphical User Interfaces | Rust Project
Learn More Rust
- 8 Solutions for Troubleshooting Your Rust Build Times
- Benchmarking Apache Cassandra with Rust
- Operating System development tutorials in Rust on the Raspberry Pi
- Learning Embedded Rust with Knurling-rs
- Building a Weather Station Bot
- Next-Gen Rust Web Apps: Towards a Svelte Fulcro in Rust
- Next-Gen Rust Web Apps: TicTacToe in Valerie
- Next-Gen Rust Web Apps: Borrowing From Fulcro for your Rust WASM Spa
- Make A Language - Part Four: Backtracking
- Make A Language - Part Five: Binding Usages
- Make A Language - Part Six: Blocks
- Make A Language - Part Seven: A REPL
- [audio] What we've learned porting our apps to Windows - Astropad
- [video] Build a Discord Bot with Rust and Serenity
Project Updates
Miscellaneous
- /r/rust is partnering with the Rust communities on Discord, Mozilla's Matrix, and Stack Overflow as venues for "IRC-like" real-time chat
- [Mesa-dev] Rust drivers in Mesa
- Designing a New Rust Class at Stanford: Safety in Systems Programming
- Memory Safety Alternative
Call for Blog Posts
The Rust Core Team wants input from the community! If you haven't already, read the official blog and submit a blog post - it will show up here! Here are the wonderful submissions since the call for blog posts:
- Rust 2021: APIs, ORMS and standards
- Rust 2021 - Stability
- The Rust Organization in 2021
- Rust 2021
- Rust 2021: lowering barriers
- Rust 2021
- The Rust 2021 Experience - Year of the Macro
- The Rust Project in 2021
Crate of the Week
This week's crate is uniffi, a unified ffi binding generator for Rust.
Thanks to mark-i-m for the suggestion!
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
427 pull requests were merged in the last week
- LLVM: handle rtcGPR64RegClassID in AArch64RegisterBankInfo::getRegBankFromRegClass()
- fix AVR stack corruption bug
- add
aarch64-unknown-linux-musl
support - defer Apple SDKROOT detection to link time
- force posix-style quoting on lld, independent of host platform
- add option to pass a custom codegen backend from a driver
- bypass const_item_mutation if const's type has Drop impl
- clean up diagnostics for arithmetic operation errors
- deduplicate and generalize some (de/)serializer impls
- expand: stop normalizing
NtIdent
s before passing them to built-in macros - fix missing diagnostic span for
impl Trait
with const generics, and add various tests formin_const_generics
andconst_generics
- improve rustdoc error for failed intra-doc link resolution
- include scope id in SocketAddrV6::Display
- library: forward compiler-builtins "mem" feature
- liveness analysis for everybody
- optimize
IntRange::from_pat
, then shrinkParamEnv
- overhaul const-checking diagnostics
- references to ZSTs may be at arbitrary aligned addresses
- remove
#[rustc_allow_const_fn_ptr]
and add#![feature(const_fn_fn_ptr_basics)]
- resolve: prohibit anon const non-static lifetimes
- chalk: add static lifetime
- chalk: implement generators
- chalk: parse opaque types without bounds
- chalk: fix assertion failure during recursive solving
- chalk: support fundamental types with multiple type parameters
- don't fire
const_item_mutation
lint on writes through a pointer - miri: check that all syscall arguments are scalars
- add support for Miri backtraces
- better error message for
async
blocks in a const-context - allow
Abort
terminators in all const-contexts - const evaluatable: improve
TooGeneric
handling - implement multiple return terminator optimization
- disable the SimplifyArmIdentity mir-opt
- implement Make
handle_alloc_error
default to panic (for no_std + liballoc) - change
AllocRef::by_ref
to take&self
instead of&mut self
- implement as_ne_bytes() for integers and floats
- stabilize
slice_ptr_range
- add missing definitions required by the sparc-unknown-linux-gnu target
- support vectors with fewer than 8 elements for
simd_select_bitmask
- unbox mutexes and condvars on some platforms
- use futex-based
thread::park
/unpark
on Linux - use less divisions in display u128/i128
- fix
Debug
implementations of some of theHashMap
andBTreeMap
iterator types - add
Iterator::advance_by
andDoubleEndedIterator::advance_back_by
- backport LLVM apfloat commit to rustc_apfloat
- cargo: fix dylib+rlib with LTO.
- uplift drop-bounds lint from clippy
- clippy: add lint for inline assembly syntax style preference
- clippy: lint for invisible Unicode characters other than ZWSP
Rust Compiler Performance Triage
- 2020-10-05: 1 Regressions, 2 Improvements, 1 Mixed
A quiet week. One rather large regression on a synthetic benchmark and a few small improvements.
#77023 is an interesting
case. It encoded an invariant about slice lengths as an assume
intrinsic
inside len
function. It seems to have caused a small compile-time slowdown,
but there was no improvement in check
build performance (a proxy for generated
code quality). In fact, the LLVM documentation specifically advises
against overuse of
the assume
intrinsic in cases where the invariant is unlikely to be of much
help to the optimizer. That seems to be the case here.
See the full report for more.
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
Tracking Issues & PRs
- [disposition: merge] stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union'
- [disposition: merge] Set up CI for aarch64-apple-darwin
- [disposition: merge] Promote aarch64-pc-windows-msvc to Tier 2 Development Platform
- [disposition: merge] resolve: Do not put nonexistent crate
meta
into prelude - [disposition: merge] Tracking issue for slice_partition_at_index
New RFCs
Upcoming Events
Online
- October 7. Johannesburg, ZA - Johannesburg Rust Meetup - Monthly Joburg Rust Chat!
- October 7. Dublin, IE - Rust Dublin - October Remote Meetup
- October 7. Indianapolis, IN, US - Indy.rs - Indy.rs - with Social Distancing
- October 8. Linz, AT - Rust Linz - Rust Meetup Linz
- October 8. San Diego, CA, US - San Diego Rust - San Diego Rust October 2020 Tele-Meetup
- October 12 - 18. RustLab
- October 13. Saabrücken, DE - Rust-Saar Meetup -
4u16
- Octover 15. Berlin, DE - Rust Hack and Learn - Berline.rs
- October 20. Denver, CO, US - Rust Denver - Data Science with Rust
- October 21. Vancover, BC, CA - Vancouver Rust - Rust Study/Hack/Hang-out night
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
- Embedded Software Engineer at Sense (Rust/C/Python, Remote or Cambridge, MA)
- Software Engineer - Rust - IOHK (Remote)
- Senior Software Engineer, Rust/Go & Linux - Red Canary (Remote)
- Software Engineer at Let's Encrypt (Remote within US and Canada)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
[...] clippy is for people who find a certain emptiness inside when they finally get code through the compiler.😉
- Unknown person answering the Rust survey
Thanks to blonk for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.