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
Highlight
Content warning: Suicide, Mental Health
The following post mourns the death of somebody in the Rust community. This is a very sensitive topic, and it's hard to truly do justice to the loss of human life. The most important thing we can do is to raise awareness surrounding mental health.
If you or somebody you know is in need of a suicide prevention hotline, please visit https://www.opencounseling.com/suicide-hotlines for emergency and suicide prevention hotline phone numbers in your country.
Official
- [Inside] 1.53.0 pre-release testing
- [Inside] Please welcome Boxy, Léo Lanteri Thauvin and the8472 to compiler-contributors
Newsletters
Project/Tooling Updates
- rust-analyzer Changelog #81
- AWS-SDK-Rust: CloudFormation, SageMaker, EC2, and SES
- Announcing Aya
- This Week In TensorBase 7
- Introducing cap-std, a capability-based version of the Rust standard library
- Wasmer 2.0, it's a big deal!
- New crate announcement,
iterate
- ripgrep 13.0.0 release
Observations/Thoughts
- A few thoughts on Fuchsia security
- On using Rust to implement shell history search/sync (interview with Ellie Huxtable)
- Visualizing memory management in Rust
- [audio] Using Rust with Flutter
Rust Walkthroughs
- Learning to Fly: Let's simulate evolution in Rust! (pt 4)
- Baby's first Rust with extra steps (XPC, launchd, and FFI)!
- Speeding Up the WebCola Graph Viz Library with Rust + WebAssembly
- From NAND to Raytracer: Raytracing on the Hack computer (feat. Rust)
- Cacao: Building macOS (and iOS) Apps in Rust
- Build an API in Rust (Part 1)
- Learn to Build a Parser in Rust for Fun and Profit
- Beginner's Guide to Running Rust on AWS Lambda
- A Command Line Key-Value Data Store using the Rust Programming Language.
- How to use casbin authorization in your rust web-app (part 3)
- Speeding up incoming message parsing by 3- to 10-times by switching from serde to the nom library
- [ZH] [series] Build front-end web apps with Yew and WebAssembly in Rust -part 3: Assets & Refactor (Rust 和 Wasm 的融合,使用 yew 构建 web 前端(3)- 资源文件及小重构)
- [ZH] [series] Build front-end web apps with Yew and WebAssembly in Rust -part 4: GraphQL data & Parsing (Rust 和 Wasm 的融合,使用 yew 构建 web 前端(4)- 获取 GraphQL 数据并解析)
- [video] Building a Web Application with Rust - Part 1 - Configuration
- [video] Building a Web Application with Rust - Part 2 - Database Setup
- [video] Lock-Free to Wait-Free Simulation in Rust (part 2)
Research
Miscellaneous
- Meet the Rustaceans: A series of interviews with Facebook Rust engineers
- Pop!_OS uses a lot of Rust
- [video] Keynote: Bryan Cantrill - Hardware/Software Co-design: The Coming Golden Age
Crate of the Week
This week has two crates: nativeshell gets you a Flutter app in Rust, while static-rc is a compile-time reference-counted smart pointer.
Thanks to Zicklag for both nominations
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.
- boa-dev/boa has some good first issues
- softprops/shiplift - We have too many unwrap() calls in the codebase
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
289 pull requests were merged in the last week
- fix force-warns to allow dashes
- suggest a trailing comma if a 1-tuple is expected and a parenthesized expression is found
- do not suggest to add type annotations for unnameable types
to_digit
simplification (less jumps)- multiple improvements to
RwLock
s - add
Ipv6Addr::is_unicast
- stabilize
wasm simd intrinsics
- stabilize
maybe_uninit_ref
- stabilize
simd_x86_bittest
- cargo: implement warning for ignored trailing arguments
- clippy: fix
while_let_on_iterator
suggestion in a closure - clippy: remove requirement of fully qualified path for
disallowed_method
/type
- clippy: fix false positive on
semicolon_if_nothing_returned
- clippy: fix false positive in
default_numeric_fallback
with external macro expansion - clippy:
Vec
extend
toappend
- BPF target support
- support for force-warns
- improve debugging experience for enums on windows-msvc
- parser: ensure that all nonterminals have tokens after parsing
- don't suggest unsized indirection in where-clauses
- rustc: allow safe
#[target_feature]
on wasm - always go through the
expn_that_defined
query - perf: miscellaneous inlining improvements
- perf: only compute the trait map once
- stabilize
vecdeque_binary_search
- update standard library for
IntoIterator
implementation of arrays - clippy: don't warn about
cfg!(..)
as a constant in assertions - clippy: fix
needless_collect
with binding shadowing - clippy: add lint
manual_str_repeat
Rust Compiler Performance Triage
Some good improvements, and a few regressions. No large changes.
Triage done by @simulacrum. Revision range: 1160cf..a50d721
3 Regressions, 3 Improvements, 1 Mixed; 1 of them in rollups
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
- [disposition: close] Add the boxed!() macro to "de-magic" box syntax
Tracking Issues & PRs
- [disposition: merge] Stabilize span_open() and span_close().
- [disposition: merge] Redefine ErrorKind::Other and stop using it in std.
- [disposition: merge] When using process::Command on Windows, environment variable names must be case-preserving but case-insensitive
- [disposition: merge] Ignore derived Clone and Debug implementations during dead code analysis
- [disposition: merge] Support forwarding caller location through trait object method call
- [disposition: merge] Tracking issue for ops::Bound::cloned()
New RFCs
Upcoming Events
Online
- June 17, 2021, Denver, CO, US - Learning Rust as a Python/Javascript developer by Juhis - Rust Denver
- June 18, 2021, Online - Learn Rust Fundamentals | Rust 101 - KubeDaily
- June 29. 2021, Dallas, TX, US - Last Tuesday - Dallas Rust
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
Tweede golf
Paige
ChainSafe Systems
Gnosis
Braiins
NZXT
Kollider
Tweet us at @ThisWeekInRust to get your job offers listed here! ChainSafe Systems
Quote of the Week
If manually managing memory is like wielding a gun, the borrow checker is an automatic safety that prevents you from pulling the trigger when you're roughly pointing it at yourself. But it's coarse-grained and errs on the side of caution; it simulates your foot as as the rectangular box that would contain it, not as a detailed 3D mesh. If you really think you can aim it between your toes and avoid hitting yourself (for example, "the value returned by this function must remain alive for no more than 15 successive invocations of this function"), unsafe will let you try, but the borrow checker's built-in rules isn't granular enough to help you, though it will still stop you if you accidentally put your hand in front without declaring it.
Thanks to StyMaar for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and cdmistman.