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.
Updates from Rust Community
- This week in Fluvio #7: the programmable streaming platform
- This week in Databend #10: an elastic and reliable cloud warehouse
- SixtyFPS (GUI crate) weekly update for 3rd of October 2021
- GCC Rust Monthly Report #10 September 2021
- Rust Analyzer Changelog #97
- Amethyst – Starting fresh
Research and Papers
- SyRust: automatic testing of Rust libraries with semantic-aware program synthesis
- Verification for dummies: SMT and Induction using the mikino model-checker
- Does the Bronze Garbage Collector Make Rust Easier to Use? A Controlled Experiment
- Does the published crate match the upstream source?
- What Rust could learn from Kotlin
- Plugins in Rust: Diving into Dynamic Loading
- Measuring power consumption: sync vs. async
- Using Rust for kernel development
- Spark and Rust - How to Build Fast, Distributed and Flexible Analytics Pipelines with Side Effects
- So You Want to Rust the Linux Kernel?
- [ZH] Rust Web Eco Watch｜ SeaORM: To be the Rust version of ActiveRecord
- [video] Talks from Rust Computer Vision Meetup 2021-09-29 (YouTube playlist)
- [video] Rust v.s Java 17 Pattern Matching
- [audio] Gleam with Louis Pilfold
- Giving Your JSON a Web API with Rust
- Exporting Test Mocks Across Crates
- Writing dockerfile in rust project
- Rust crimes: Enum ints
- Scalable server design in Rust with Tokio
- Running Rust on AWS Lambda on ARM64
- How to deploy a Rust REST API application on AWS with ease
- [PT] Rust - Borrowing?
- [series] Build Your Text Editor With Rust!
- [video] Building a Reddit Ticker with Rust and Flutter using Rid and Bloc/Cubit
- [video] Pattern Syntax in Rust
Crate of the Week
This week's crate is pubgrub, a Rust implementation of the state of the art version solving algorithm.
Thanks to Louis Pilfold for the suggestion!
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.
- This Week in Rust is looking for additional editors
- Veloren will be participating in Hacktoberfest 2021!
- RustFest - Introducing Rust in Arts
- caniuse.rs - Data to add
- cargo - Help Wanted Issues
- Implement IntoIterator/FromIterator for AddressSet
- Split Context methods accepting
Into<T>generics up to improve compile time and binary size
- Implement unevaluatedProperties
- Implement unevaluatedItems
- Implement dependentRequired & dependentSchemas
- Python: Add an iterator over validation errors
Updates from the Rust Project
266 pull requests were merged in the last week
- make const (), mut () okay for FFI
- resolve: cache module loading for all foreign modules
- improve error message for missing angle brackets in
- avoid nondeterminism in
- improve error message for printf-style format strings
- pick one possible lifetime in case there are multiple choices
- suggest using the path separator for tuple struct
- suggest similarly named associated items in trait impls
- improve cause information for NLL higher-ranked errors
<...> defined herenote if the source is not available
- fix incorrect disambiguation suggestion for associated items
- fix unsound optimization with explicit variant discriminants
- don't anonymize bound region names during typeck
- pass real crate-level attributes to
- use larger span for adjustment THIR expressions
- coerce const FnDefs to implement const Fn traits
- constify ?-operator for
- partially stabilize
- avoid spurious "previous iteration of loop" errors
- include the length in
- optimize unnecessary check in
VecDeque: improve performance for
str::from_utf8()validation when slice contains multibyte chars and
str.chars().count()in all * Fix
read_to_endto not grow an exact size buffer
- mark unsafe methods
mul} as const
- const fn for
- hashbrown: relax the bounds on
- clippy: correctly handle signs in exponents in
- clippy: make
if_then_panichandle situation of
BinOpKind::And || BinOpKind::Or
- clippy: re-write
- clippy: make
doc_unsafewarn on unsafe traits as well
- clippy: fix bug for
- clippy: add new 'while_let_some_result' linting
- clippy: add lint
- clippy: fix ICE in
- clippy: exclude enum from derivable impls
Rust Compiler Performance Triage
A fairly busy week, with a relatively high percentage of PRs landing with regressions and improvements. The overall trajectory is fairly neutral for this week though.
Triage done by @simulacrum. Revision range: 83f147b..25ec82
5 Regressions, 5 Improvements, 5 Mixed; 1 of them in rollups
43 comparisons made in total
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.
No RFCs are currently in the final comment period.
- [disposition: merge] Partially stabilize duration_consts_2
- [disposition: merge] Stabilize unreachable_unchecked as const fn
- [disposition: merge] Add
- [disposition: merge] Fix ctrl-c causing reads of stdin to return empty on Windows.
- [disposition: merge] Tracking Issue for saturating_div
- [disposition: merge] Avoid allocations and copying in
- [disposition: merge] linux/aarch64 Now() should be actually_monotonic()
- [disposition: merge] Stabilise unix_process_wait_more, extra ExitStatusExt methods
- [disposition: merge] Make all proc-macro back-compat lints deny-by-default
- [disposition: merge] Windows: Resolve process::Command program without using the current directory
- [disposition: merge] Implement RefUnwindSafe for
- [disposition: merge] Reject octal zeros in IPv4 addresses
- [disposition: merge] Tracking Issue for methods to go from nul-terminated
- [disposition: merge] Tracking issue for
- [disposition: close] Tracking issue for
- October 9, 2021 - Rust Gamedev Discord - Rust Gamedev Monthly Meetup
- October 12, 2021, Berlin, DE - Rust Hack and Learn - Berline.rs
- October 12, 2021, Seattle, WA, US - Monthly meetup - Seattle Rust Meetup
- October 13, 2021 - betterCode Rust
- October 13, 2021 - C++/Rust: Learning from Each Other - MUC++
- October 13, 2021, Los Angeles, CA, US - Processing shaders in Rust with Dzmitry Malyshau - Rust Los Angeles
- October 20, 2021, Buffalo, NY, US - Buffalo Rust User Group, Alternate Day - Buffalo Rust
- October 20, 2021, Vancouver, BC, CA - WASM plugin for Istio - Vancouver Rust
- Backend Engineer - Rust - Core Backend (Remote)
- Backend Engineer, Kraken Futures - Rust (Remote)
- Senior Rust Engineer - Banking (Remote)
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
There's a common trope among people unfamiliar with rust where they assume that if you use unsafe at all, then it's just as unsafe as C and rust provided no benefit. Comparing C's approach to safety vs Rust's is like comparing an open world assumption to a closed world assumption in formal logic systems. In C, you publish your api if it's possible to use correctly (open world). In Rust, you publish a safe api if it's im possible to use in correctly (closed world). Rust's key innovation here is that it enables you to build a 'bridge' from open world (unsafe) to a closed world (safe), a seemingly impossible feat that feels like somehow pairwise reducing an uncountable infinity with a countable infinity. Rust's decision to design an analogous closed-world assumption for safe code is extremely powerful, but it seems very hard for old school C programmers to wrap their head around it.
Thanks to Alice Ryhl for the suggestion!