|
| 1 | +Title: This Week in Rust 421 |
| 2 | +Number: 421 |
| 3 | +Date: 2021-12-15 |
| 4 | +Category: This Week in Rust |
| 5 | + |
| 6 | +Hello and welcome to another issue of *This Week in Rust*! |
| 7 | +[Rust](http://rust-lang.org) is a programming language empowering everyone to build reliable and efficient software. |
| 8 | +This is a weekly summary of its progress and community. |
| 9 | +Want something mentioned? Tweet us at [@ThisWeekInRust](https://twitter.com/ThisWeekInRust) or [send us a pull request](https://github.com/rust-lang/this-week-in-rust). |
| 10 | +Want to get involved? [We love contributions](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md). |
| 11 | + |
| 12 | +*This Week in Rust* is openly developed [on GitHub](https://github.com/rust-lang/this-week-in-rust). |
| 13 | +If you find any errors in this week's issue, [please submit a PR](https://github.com/rust-lang/this-week-in-rust/pulls). |
| 14 | + |
| 15 | +## Updates from Rust Community |
| 16 | + |
| 17 | +### Official |
| 18 | + |
| 19 | +* [Launching the 2021 State of Rust Survey](https://blog.rust-lang.org/2021/12/08/survey-launch.html) |
| 20 | + |
| 21 | +### Foundation |
| 22 | + |
| 23 | +* [Member Spotlight: Automata](https://foundation.rust-lang.org/posts/2021-12-13-member-spotlight-automata/) |
| 24 | + |
| 25 | +### Newsletters |
| 26 | + |
| 27 | +* [WebAssembly Weekly](https://wasmweekly.news/issue-161/) |
| 28 | +* [This Month in Rust GameDev #28 - November 2021](https://gamedev.rs/news/028/) |
| 29 | + |
| 30 | +### Project/Tooling Updates |
| 31 | + |
| 32 | +* [Rust Analyzer Changelog #107](https://rust-analyzer.github.io/thisweek/2021/12/13/changelog-107.html) |
| 33 | +* [Cranelift Progress Report: A Look Back at 2021](https://bytecodealliance.org/articles/cranelift-progress-2021) |
| 34 | +* [Rust for Linux ](https://lore.kernel.org/lkml/[email protected]/) |
| 35 | +* [Announcing rsadsb v0.4.0: View Airplanes in the sky with Rust](https://rsadsb.github.io/v0.4.0.html) |
| 36 | +* [SixtyFPS (GUI crate): Changelog for 12th of December 2021](https://sixtyfps.io/thisweek/2021-12-13.html) |
| 37 | +* [sysinfo: version 0.22 and FreeBSD support](https://blog.guillaume-gomez.fr/articles/2021-12-14+sysinfo%3A+version+0.22+and+FreeBSD+support) |
| 38 | +* [Announcing the Grafana Plugin SDK for Rust](https://www.reddit.com/r/rust/comments/rbvmib/announcing_the_grafana_plugin_sdk_for_rust/) |
| 39 | +* [Announcing Enzyme for Rust](https://www.reddit.com/r/rust/comments/reo75u/enzyme_towards_stateoftheart_autodiff_in_rust/) |
| 40 | +* [This week in Databend #20: an elastic and reliable cloud warehouse](https://weekly.databend.rs/2021-12-15-databend-weekly/) |
| 41 | +* [This week in Fluvio #16: the programmable streaming platform](https://www.fluvio.io/news/this-week-in-fluvio-0016/) |
| 42 | +* [git-cliff 0.5.0 (changelog generator)](https://orhun.dev/blog/git-cliff-0.5.0/) |
| 43 | + |
| 44 | +### Observations/Thoughts |
| 45 | + |
| 46 | +* [Rust as a platform for IoT](https://blog.ysndr.de/posts/essays/2021-12-12-rust-for-iot/) |
| 47 | +* [https://madsravn.dk/posts/using-liquid-rust-with-serde](https://madsravn.dk/posts/using-liquid-rust-with-serde) |
| 48 | +* [Rust Error Handling](https://www.unwoundstack.com/blog/rust-error-handling.html) |
| 49 | +* [How not to learn Rust](https://dystroy.org/blog/how-not-to-learn-rust/) |
| 50 | +* [audio] [Refactoring to Rust with Lily Mara](https://rustacean-station.org/episode/049-lily-mara/) |
| 51 | +* [video] [Talking about the Rust Programming Language with Luca Palmieri](https://www.youtube.com/watch?v=WaTEjSHFMbY) |
| 52 | + |
| 53 | +### Rust Walkthroughs |
| 54 | + |
| 55 | +* [A brutally effective hash function in Rust](https://nnethercote.github.io/2021/12/08/a-brutally-effective-hash-function-in-rust.html) |
| 56 | +* [Less Painful Linear Types](https://aidancully.blogspot.com/2021/12/less-painful-linear-types.html) |
| 57 | +* [A Rust Api pattern (Actix)](https://ctprods.cyprientaque.com/blog/a-rust-api-pattern-actix) |
| 58 | +* [Authoring a SIMD enhanced Wasm library with Rust](https://nickb.dev/blog/authoring-a-simd-enhanced-wasm-library-with-rust) |
| 59 | +* [Getting better insights into your Rust applications](https://21-lessons.com/getting-better-insights-into-your-rust-applications/) |
| 60 | +* [Validating JSON input in Rust web services](https://vinted.engineering/2021/02/15/validating-json-input-in-rust-web-services/) |
| 61 | +* [video] [Building a networked Web and Native app with Rust](https://www.youtube.com/watch?v=yIkUWT4QXCA) |
| 62 | +* [series] [video] [rg3d - live game development #4](https://www.youtube.com/watch?v=FGi8evJFdnw) |
| 63 | + |
| 64 | +### Miscellaneous |
| 65 | + |
| 66 | +* [The DevX Initiative Sponsorship Program: Goals and Principles](https://medium.com/concordium/the-devx-initiative-sponsorship-program-goals-and-principles-e640063eeaa7) |
| 67 | +* [Introducing the new Relay compiler](https://relay.dev/blog/2021/12/08/introducing-the-new-relay-compiler/) |
| 68 | +* [DE] [Linux-Kernel: Rust-Entwicklung schreitet mit neuer Edition voran](https://www.heise.de/news/Linux-Kernel-Rust-Entwicklung-schreitet-mit-neuer-Edition-voran-6287775.html) |
| 69 | + |
| 70 | +## Crate of the Week |
| 71 | + |
| 72 | +This week's crate is [efg](https://crates.io/crates/efg), a proc macro to allow boolean expression like syntax for `#[cfg]`s. |
| 73 | + |
| 74 | +Thanks to [farnbams](https://users.rust-lang.org/t/crate-of-the-week/2704/991) for the suggestion! |
| 75 | + |
| 76 | +[Please submit your suggestions and votes for next week][submit_crate]! |
| 77 | + |
| 78 | +[submit_crate]: https://users.rust-lang.org/t/crate-of-the-week/2704 |
| 79 | + |
| 80 | +## Call for Participation |
| 81 | + |
| 82 | +Always wanted to contribute to open-source projects but didn't know where to start? |
| 83 | +Every week we highlight some tasks from the Rust community for you to pick and get started! |
| 84 | + |
| 85 | +Some of these tasks may also have mentors available, visit the task page for more information. |
| 86 | + |
| 87 | +**Ockam** |
| 88 | + |
| 89 | +* [Change no_main feature on ockam_macros to an argument](https://github.com/ockam-network/ockam/issues/2358) |
| 90 | +* [Reduce the features that the ockam_macros crate requires from syn](https://github.com/ockam-network/ockam/issues/2357) |
| 91 | + |
| 92 | +If you are a Rust project owner and are looking for contributors, please submit tasks [here][guidelines]. |
| 93 | + |
| 94 | +[guidelines]: https://users.rust-lang.org/t/twir-call-for-participation/4821 |
| 95 | + |
| 96 | +## Updates from the Rust Project |
| 97 | + |
| 98 | +315 pull requests were [merged in the last week][merged] |
| 99 | + |
| 100 | +[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2021-12-06..2021-12-13 |
| 101 | + |
| 102 | +* [asm: allow using r9 (ARM) and x18 (AArch64) if they are not reserved by the current target](https://github.com/rust-lang/rust/pull/91643) |
| 103 | +* [suggest using a temporary variable to fix borrowck errors](https://github.com/rust-lang/rust/pull/83174) |
| 104 | +* [tweak "call this function" suggestion to have smaller span](https://github.com/rust-lang/rust/pull/91503) |
| 105 | +* [tweak assoc type obligation spans](https://github.com/rust-lang/rust/pull/91769) |
| 106 | +* [better span for unexpected normalization failure in CTFE engine](https://github.com/rust-lang/rust/pull/91815) |
| 107 | +* [give more help in the unaligned_references lint](https://github.com/rust-lang/rust/pull/91718) |
| 108 | +* [suggest casting between `i`/`u32` and `char`](https://github.com/rust-lang/rust/pull/91245) |
| 109 | +* [add a suggestion if `macro_rules` is misspelled](https://github.com/rust-lang/rust/pull/91337) |
| 110 | +* [avoid cloning refcounted types during folding](https://github.com/rust-lang/rust/pull/91353) |
| 111 | +* [deduplicate projection sub-obligations](https://github.com/rust-lang/rust/pull/90423) |
| 112 | +* [do not ICE when suggesting elided lifetimes on non-existent spans](https://github.com/rust-lang/rust/pull/91764) |
| 113 | +* [do not add `;` to expected tokens list when it's wrong](https://github.com/rust-lang/rust/pull/91531) |
| 114 | +* [do not attempt to suggest help for overly malformed struct/function call](https://github.com/rust-lang/rust/pull/91634) |
| 115 | +* [improve 'cannot contain emoji' error](https://github.com/rust-lang/rust/pull/91476) |
| 116 | +* [add `spin_loop` hint for RISC-V architecture](https://github.com/rust-lang/rust/pull/91548) |
| 117 | +* [override `Iterator::advance`(`_back`)`_by` for `array::IntoIter`](https://github.com/rust-lang/rust/pull/91512) |
| 118 | +* [replace dominators algorithm with simple Lengauer-Tarjan](https://github.com/rust-lang/rust/pull/85013) |
| 119 | +* [add `<*{const|mut} T>::{to|from}_bits`](https://github.com/rust-lang/rust/pull/91127) |
| 120 | +* [add `array::IntoIter::`{`empty`, `from_raw_parts`}](https://github.com/rust-lang/rust/pull/91341) |
| 121 | +* [add `rsplit_array` variants to slices and arrays](https://github.com/rust-lang/rust/pull/91515) |
| 122 | +* [make `Option::cloned` `const`](https://github.com/rust-lang/rust/pull/90741) |
| 123 | +* [make `(*mut T)::write_bytes` `const`](https://github.com/rust-lang/rust/pull/91824) |
| 124 | +* [make `Borrow` and `BorrowMut` impls `const`](https://github.com/rust-lang/rust/pull/90270) |
| 125 | +* [make `Unique`s methods `const`](https://github.com/rust-lang/rust/pull/91806) |
| 126 | +* [make `intrinsics::write_bytes` `const`](https://github.com/rust-lang/rust/pull/90081) |
| 127 | +* [implement `TryFrom<&'_ mut [T]>` for `[T; N]`](https://github.com/rust-lang/rust/pull/91086) |
| 128 | +* [implement `core::future::join!`](https://github.com/rust-lang/rust/pull/91645) |
| 129 | +* [implement concat_bytes!](https://github.com/rust-lang/rust/pull/87599) |
| 130 | +* [provide the `ReadBuf` abstraction](https://github.com/rust-lang/rust/pull/81156) |
| 131 | +* [stabilise `feature(const_generics_defaults)`](https://github.com/rust-lang/rust/pull/90207) |
| 132 | +* [stabilize `ControlFlow::`{`is_break`, `is_continue`}](https://github.com/rust-lang/rust/pull/91091) |
| 133 | +* [stabilize `const_cstr_unchecked`](https://github.com/rust-lang/rust/pull/91855) |
| 134 | +* [cargo: improve I/O error message for fingerprint of build script](https://github.com/rust-lang/cargo/pull/10191) |
| 135 | +* [rustdoc: show type layout for type aliases](https://github.com/rust-lang/rust/pull/91682) |
| 136 | +* [clippy: add new lint to warn when `#[must_use]` attribute should be used on a method](https://github.com/rust-lang/rust-clippy/pull/8071) |
| 137 | +* [clippy: fix FP on `question_mark` if returned object is not local](https://github.com/rust-lang/rust-clippy/pull/8080) |
| 138 | +* [clippy: fix `blocks_in_if_conditions` false positive](https://github.com/rust-lang/rust-clippy/pull/8100) |
| 139 | +* [clippy: fix bad suggestion on `option_if_let_else` when there is complex subpat](https://github.com/rust-lang/rust-clippy/pull/8086) |
| 140 | +* [clippy: ignore associated types in traits when considering type complexity](https://github.com/rust-lang/rust-clippy/pull/8030) |
| 141 | + |
| 142 | +### Rust Compiler Performance Triage |
| 143 | + |
| 144 | +This week's report started with 6 regressions; after eliminating truly obvious noise, we are left with just 2 minor regressions. Of the cases that regressed, I think the only interesting one is keccak (regressed by 1.73% in PR #91549). But don't be too depressed: keccak was also improved up to 23% by PR #85013 (!); thanks to @**simulacrum** for that PR. |
| 145 | + |
| 146 | +Triage done by **@pnkfelix**. |
| 147 | +Revision range: [e2116a..404c847](https://perf.rust-lang.org/?start=e2116acae59654bfab2a9729a024f3e2fd6d4b02&end=404c8471aba60c2d837fa728e7c729a0f52d5830&absolute=false&stat=instructions%3Au) |
| 148 | + |
| 149 | +2 Regressions, 5 Improvements, 3 Mixed; 1 of them in rollups |
| 150 | +48 comparisons made in total |
| 151 | + |
| 152 | +[Full report here](https://github.com/rust-lang/rustc-perf/blob/master/triage/2021-12-14.md) |
| 153 | + |
| 154 | +### [Approved RFCs](https://github.com/rust-lang/rfcs/commits/master) |
| 155 | + |
| 156 | +Changes to Rust follow the Rust [RFC (request for comments) process](https://github.com/rust-lang/rfcs#rust-rfcs). These |
| 157 | +are the RFCs that were approved for implementation this week: |
| 158 | + |
| 159 | +* *No RFCs were approved this week.* |
| 160 | + |
| 161 | +### Final Comment Period |
| 162 | + |
| 163 | +Every week [the team](https://www.rust-lang.org/team.html) announces the |
| 164 | +'final comment period' for RFCs and key PRs which are reaching a |
| 165 | +decision. Express your opinions now. |
| 166 | + |
| 167 | +#### [RFCs](https://github.com/rust-lang/rfcs/labels/final-comment-period) |
| 168 | + |
| 169 | +* [disposition: merge] [Amend RFC 2996 to replace Stream with AsyncIterator](https://github.com/rust-lang/rfcs/pull/3208) |
| 170 | +* [disposition: merge] [Thread local Cell methods.](https://github.com/rust-lang/rfcs/pull/3184) |
| 171 | + |
| 172 | +#### [Tracking Issues & PRs](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc) |
| 173 | + |
| 174 | +* [disposition: merge] [Make rustdoc --passes and rustdoc --no-defaults have no effect](https://github.com/rust-lang/rust/issues/91714) |
| 175 | +* [disposition: merge] [make Instant::{duration_since, elapsed, sub} saturating and remove workarounds](https://github.com/rust-lang/rust/pull/89926) |
| 176 | +* [disposition: close] [Tracking issue for RFC 2115: In-band lifetime bindings](https://github.com/rust-lang/rust/issues/44524) |
| 177 | + |
| 178 | +### [New RFCs](https://github.com/rust-lang/rfcs/pulls) |
| 179 | + |
| 180 | +* *No new RFCs were published this week.* |
| 181 | + |
| 182 | +## Upcoming Events |
| 183 | + |
| 184 | +Rusty Events between 12/15/2021 - 1/15/2022 🦀 |
| 185 | + |
| 186 | +### Online |
| 187 | + |
| 188 | +* [December 15, 2021 | Cardiff, UK | **Rust Book Study Session - Error Handling & Generic Types, Traits, and Lifetimes** | Rust and C++ Cardiff](https://www.meetup.com/rust-and-c-plus-plus-in-cardiff/events/282313169/) |
| 189 | +* [December 16, 2021 | Linz, AT | **Rust Meetup Linz - 17th Edition** | Rust Linz](https://www.meetup.com/Rust-Linz/events/282559064/) |
| 190 | +* [December 17, 2021 | Various cities, IR | **The Third Rust Iran online meetup** | Rust Iran Meetup](https://rust-meetup.ir) |
| 191 | +* [December 18, 2021 | Vancouver, BC, CA | **Your Rust Web Development Toolset** | Vancouver Rust](https://www.meetup.com/Vancouver-Rust/events/nwcmpsyccqbtb/) |
| 192 | +* [December 21, 2021 | Los Gatos, CA, US | **Book #24 - Rust for Rustaceans - Chapter 1 (session 3)** | Los Gatos Reading Group](https://www.meetup.com/Los-Gatos-Rust-Reading-Group/events/282687733/) | [Alternative Link (South Padre Island, TX Reading Group)](https://www.meetup.com/the-south-padre-island-reading-group/events/282687761/) |
| 193 | +* [December 21, 2021 | Washington, DC, US | **Mid-month Rustful** | Rust DC](https://www.meetup.com/RustDC/events/vdhxgsyccqbcc/) |
| 194 | +* [December 23, 2021 | Stuttgart, DE | **Rust-Meetup** | Rust Community Stuttgart](https://www.meetup.com/Rust-Community-Stuttgart/events/ttjjqsyccqbfc/) |
| 195 | +* [December 28, 2021 | Dallas, TX, US | **Dallas Rust - Last Tuesday** | Dallas Rust](https://www.meetup.com/Dallas-Rust/events/jqxqwryccqblc/) |
| 196 | +* [January 5, 2022 | Indianapolis, IN, US | **Indy.rs - with Social Distancing** | Indy Rust](https://www.meetup.com/indyrs/events/qwtdjsydccbhb/) |
| 197 | +* [January 6, 2022 | Nürnberg, DE | **Rust Nürnberg online #8**| Rust Nuremberg](https://www.meetup.com/rust-noris/events/282344613/) |
| 198 | +* [January 8, 2022 | Various cities | **Rust GameDev Monthly Meetup** | Rust GameDev](https://www.google.com/calendar/embed?src=apd9vmbc22egenmtu5l6c5jbfc%40group.calendar.google.com) |
| 199 | +* [January 11, 2022 | Seattle, WA, US | **Monthly meetup** | Seattle Rust Meetup](https://www.meetup.com/Seattle-Rust-Meetup/events/gskksrydccbpb/) |
| 200 | +* [January 12, 2022 | Boulder, CO, US | **Monthly Meetup** | Boulder Elixir and Rust](https://www.meetup.com/boulder-elixir-rust/events/zvxcsrydccbqb/) |
| 201 | +* [January 12, 2022 | Los Angeles, CA, US | **Live Coding Session - Mob Programming a Rust Code Kata [Virtual] Jan. 2022** | Rust Los Angeles](https://www.meetup.com/Rust-Los-Angeles/events/282580016/) |
| 202 | +* [January 12, 2022 | Stuttgart, DE | **Rust-Meetup** | Rust Community Stuttgart](https://www.meetup.com/Rust-Community-Stuttgart/events/gjrtqsydccbqb/) |
| 203 | + |
| 204 | + |
| 205 | +### North America |
| 206 | + |
| 207 | +* [December 16, 2021 | Austin, TX, US | **Rust Lunch** | Rust ATX](https://www.meetup.com/rust-atx/events/282472182) |
| 208 | +* [January 12, 2022 | Atlanta, GA, US | **Grab a beer with fellow Rustaceans** | Rust Atlanta](https://www.meetup.com/Rust-ATL/events/lhpkmsydccbqb/) |
| 209 | +* [January 13, 2022 | Columbus, OH, US | **Monthly Meeting** | Columbus Rust Society](https://www.meetup.com/columbus-rs/events/dpkhgrydccbrb/) |
| 210 | + |
| 211 | + |
| 212 | +If you are running a Rust event please add it to the [calendar] to get |
| 213 | +it mentioned here. Please remember to add a link to the event too. |
| 214 | +Email the [Rust Community Team][community] for access. |
| 215 | + |
| 216 | +[calendar]: https://www.google.com/calendar/embed?src=apd9vmbc22egenmtu5l6c5jbfc%40group.calendar.google.com |
| 217 | +[community]: mailto:[email protected] |
| 218 | + |
| 219 | +# Rust Jobs |
| 220 | + |
| 221 | +**Kraken** |
| 222 | + |
| 223 | +* [Backend Engineer - Rust - Core Backend (Remote)](https://jobs.lever.co/kraken/4019a818-4a7b-46ef-9225-c53c7a7f238c) |
| 224 | +* [Backend Engineer, Kraken Futures - Rust (Remote)](https://jobs.lever.co/kraken/fe1e07f4-6d7c-4f65-9a8f-27cf3b3fd2b1) |
| 225 | +* [Senior Rust Engineer - Banking (Remote)](https://jobs.lever.co/kraken/2863623f-13c9-4f50-992d-7c25736a60f9) |
| 226 | + |
| 227 | +*Tweet us at [@ThisWeekInRust](https://twitter.com/ThisWeekInRust) to get your job offers listed here!* |
| 228 | + |
| 229 | +# Quote of the Week |
| 230 | + |
| 231 | +> This is safer than you may think, because those who need async tend to know it themselves and |
| 232 | +> don't ask "should I use async" question. In other words, asking itself is a signal that answer is |
| 233 | +> no. MITM proxy case was a rare exception. |
| 234 | +
|
| 235 | +– [Seo Sanghyeon on rust-users](https://users.rust-lang.org/t/examples-of-high-performance-rust-multi-thread-network-app-w-o-async/68513/4) |
| 236 | + |
| 237 | +Thanks to [Zeroexcuses](https://users.rust-lang.org/t/twir-quote-of-the-week/328/1146) for the suggestion! |
| 238 | + |
| 239 | +[Please submit quotes and vote for next week!](https://users.rust-lang.org/t/twir-quote-of-the-week/328) |
| 240 | + |
| 241 | +*This Week in Rust is edited by: [nellshamrell](https://github.com/nellshamrell), [llogiq](https://github.com/llogiq), [cdmistman](https://github.com/cdmistman), [ericseppanen](https://github.com/ericseppanen), [extrawurst](https://github.com/extrawurst), [andrewpollack](https://github.com/andrewpollack), [U007D](https://github.com/U007D), [kolharsam](https://github.com/kolharsam), [joelmarcey](https://github.com/joelmarcey), [mariannegoldin](https://github.com/mariannegoldin).* |
| 242 | + |
| 243 | +*Email list hosting is sponsored by [The Rust Foundation](https://foundation.rust-lang.org/)* |
| 244 | + |
| 245 | +<small>[Discuss on r/rust](https://www.reddit.com/r/rust/comments/rhgfiw/this_week_in_rust_421/)</small> |
0 commit comments