|
| 1 | +Title: This Week in Rust 385 |
| 2 | +Number: 385 |
| 3 | +Date: 2021-04-07 |
| 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 systems language pursuing the trifecta: safety, concurrency, and speed. |
| 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 | +No papers/research projects this week. |
| 18 | + |
| 19 | +### Official |
| 20 | +* [Inside] [Core Team updates](https://blog.rust-lang.org/inside-rust/2021/04/03/core-team-updates.html) |
| 21 | +* [Foundation] [Introducing Peixin Hou](https://foundation.rust-lang.org/posts/2021-04-08-introducing-peixin-hou/) |
| 22 | +* [Foundation] [Introducing Florian Gilcher](https://foundation.rust-lang.org/posts/2021-04-08-introducing-florian-gilcher/) |
| 23 | + |
| 24 | +### Newsletters |
| 25 | +* [This Month in Rust OSDev (March 2021)](https://rust-osdev.com/this-month/2021-03/) |
| 26 | +* [RiB Newsletter #22 - A few tweaks](https://www.reddit.com/r/rust/comments/mhmfu9/rib_newsletter_22_a_few_tweaks/) |
| 27 | + |
| 28 | +### Project/Tooling Updates |
| 29 | +* [GCC Rust Monthly Report #4 March 2021](https://thephilbert.io/2021/04/02/gcc-rust-monthly-report-4-march-2021/) |
| 30 | +* [mrustc upgrade: rustc 1.39.0](https://www.reddit.com/r/rust/comments/mjxbaz/mrustc_upgrade_rustc_1390/) |
| 31 | +* [rust-analyzer Changelog #71](https://rust-analyzer.github.io/thisweek/2021/04/05/changelog-71.html) |
| 32 | +* [A new Left Recursive PEG Parser Generator for rust](https://www.mess.org/2021/03/26/Left-Recursive-PEG-Parser-Generator/) |
| 33 | +* [Last Month in Flott (Motion Control Toolkit in Rust) - April 2021](https://flott-motion.org/news/last-month-in-flott-april-2021/) |
| 34 | +* [Recent updates in IntelliJ Rust](https://blog.jetbrains.com/rust/2021/04/08/intellij-rust-updates-for-2021-1/) |
| 35 | +* [Bevy 0.5](https://bevyengine.org/news/bevy-0-5/) |
| 36 | + |
| 37 | +### Observations/Thoughts |
| 38 | +* [Interfacing a low-level actor system to Rust async/await, part 1](https://uazu.github.io/blog/20210406.html) |
| 39 | +* [A Tour of Safe Tracing GC Designs in Rust](https://manishearth.github.io/blog/2021/04/05/a-tour-of-safe-tracing-gc-designs-in-rust/) |
| 40 | +* [How I Used Rust + Lunatic to Build a TelNet Chat Server with WebAssembly](https://www.hackernoon.com/how-i-used-rust-lunatic-to-build-a-telnet-chat-server-with-webassembly-rb3l33cg) |
| 41 | +* [Eliminating Data Races in Firefox - A Technical Report](https://hacks.mozilla.org/2021/04/eliminating-data-races-in-firefox-a-technical-report/) |
| 42 | +* [First-class IO](https://blog.sunfishcode.online/first-class-io/) |
| 43 | +* [The modern packager's security nightmare](https://blogs.gentoo.org/mgorny/2021/02/19/the-modern-packagers-security-nightmare/) |
| 44 | +* [Ordering Requests to Accelerate I/O](https://pkolaczk.github.io/disk-access-ordering/) |
| 45 | +* [An essay of checked exceptions in Rust](https://users.rust-lang.org/t/an-essay-of-checked-exceptions-in-rust/57769) |
| 46 | +* [Weird architectures weren't supported to begin with](https://blog.yossarian.net/2021/02/28/Weird-architectures-werent-supported-to-begin-with) |
| 47 | +* [video] [I tried learning OpenGL in 7 days - using Rust](https://youtu.be/KEQIWqSq42k) |
| 48 | + |
| 49 | +### Rust Walkthroughs |
| 50 | +* [How we built our Python Client that's mostly Rust](https://www.fluvio.io/blog/2021/03/python-client/) |
| 51 | +* [Hello world with KAS GUI](https://kas-gui.github.io/tutorials/hello.html) |
| 52 | +* [How to create small Docker images for Rust](https://kerkour.com/blog/rust-small-docker-image/) |
| 53 | +* [Oxidizing the Kubernetes Operator](https://www.pavel.cool/rust/rust-kubernetes-operators/) |
| 54 | +* [Sending tuples from Node to Rust and back](https://www.fluvio.io/blog/2021/04/node-bindgen-tuples/) |
| 55 | +* [Getting started with Kafka and Rust: Part 1](https://dev.to/abhirockzz/getting-started-with-kafka-and-rust-part-1-4hkb) |
| 56 | +* [A Beginner's Guide to Handling Errors in Rust](https://dev.to/seanchen1991/a-beginner-s-guide-to-handling-errors-in-rust-40k2) |
| 57 | +* [Using Seahorn](https://project-oak.github.io/rust-verification-tools/using-seahorn/) |
| 58 | +* [Asynchronous streams in Rust (part 1) - Futures, buffering and mysterious compilation error messages](https://gendignoux.com/blog/2021/04/01/rust-async-streams-futures-part1.html) |
| 59 | +* [series] [What would SQLite look like if written in Rust? — Part 3](https://medium.com/the-polyglot-programmer/what-would-sqlite-look-like-if-written-in-rust-part-3-edd2eefda473) |
| 60 | +* [video] [Return a value from a function in Rust](https://www.youtube.com/watch?v=YNSg7g46Hso) |
| 61 | +* [video] [Crust of Rust: Atomics and Memory Ordering](https://youtu.be/rMGWeSjctlY) |
| 62 | +* [video] [Async/Await in Rust: Introduction](https://youtu.be/FNcXf-4CLH0) |
| 63 | +* [video] [OpenVehicleDiag Rust live coding with Macchina's A0!!](https://youtu.be/zjAe-uvKMJ4) |
| 64 | +* [video] [series] [Easy Rust - learn to program in Rust with simple English](https://youtube.com/playlist?list=PLfllocyHVgsRwLkTAhG0E-2QxCf-ozBkk) |
| 65 | + |
| 66 | +### Miscellaneous |
| 67 | +* [best-of-ml-rust: A ranked list of awesome machine learning Rust libraries](https://github.com/e-tony/best-of-ml-rust) |
| 68 | +* [Rust in the Android platform](https://security.googleblog.com/2021/04/rust-in-android-platform.html) |
| 69 | +* [David Tolnay - thank you](https://www.reddit.com/r/rust/comments/mify2o/david_tolnay_thank_you/) |
| 70 | +* [My "shiny future"](https://smallcultfollowing.com/babysteps/blog/2021/04/02/my-shiny-future/) |
| 71 | + |
| 72 | +# Crate of the Week |
| 73 | + |
| 74 | +This week's crate is [rs-pbrt](https://crates.io/crates/rs_pbrt), a counterpart to the PBRT book's (3rd edition) C++ code. |
| 75 | + |
| 76 | +Thanks to [Jan Walter](https://users.rust-lang.org/t/crate-of-the-week/2704/900) for the suggestion! |
| 77 | + |
| 78 | +[Submit your suggestions and votes for next week][submit_crate]! |
| 79 | + |
| 80 | +[submit_crate]: https://users.rust-lang.org/t/crate-of-the-week/2704 |
| 81 | + |
| 82 | +# Call for Participation |
| 83 | + |
| 84 | +Always wanted to contribute to open-source projects but didn't know where to start? |
| 85 | +Every week we highlight some tasks from the Rust community for you to pick and get started! |
| 86 | + |
| 87 | +Some of these tasks may also have mentors available, visit the task page for more information. |
| 88 | + |
| 89 | +* [dotenv-linter has several good first issues](https://github.com/dotenv-linter/dotenv-linter/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) |
| 90 | + |
| 91 | +If you are a Rust project owner and are looking for contributors, please submit tasks [here][guidelines]. |
| 92 | + |
| 93 | +[guidelines]: https://users.rust-lang.org/t/twir-call-for-participation/4821 |
| 94 | + |
| 95 | +# Updates from Rust Core |
| 96 | + |
| 97 | +313 pull requests were [merged in the last week][merged] |
| 98 | + |
| 99 | +[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2021-03-29..2021-04-05 |
| 100 | + |
| 101 | +* [fix stack overflow detection on FreeBSD 11.1+](https://github.com/rust-lang/rust/pull/83771) |
| 102 | +* [disallow the use of high byte registes as operands on `x86_64`](https://github.com/rust-lang/rust/pull/83853) |
| 103 | +* [resolve/expand: cache intermediate results of `#[derive]` expansion](https://github.com/rust-lang/rust/pull/82907) |
| 104 | +* [panic early when `TrustedLen` indicates a `length > usize::MAX`](https://github.com/rust-lang/rust/pull/83726) |
| 105 | +* [suggest `box`/`pin`/`arc`ing receiver on method calls](https://github.com/rust-lang/rust/pull/83667) |
| 106 | +* [run LLVM coverage instrumentation passes before optimization passes](https://github.com/rust-lang/rust/pull/83666) |
| 107 | +* [simplify logical operations CFG](https://github.com/rust-lang/rust/pull/83663) |
| 108 | +* [remove unneeded type resolving](https://github.com/rust-lang/rust/pull/83839) |
| 109 | +* [unaligned_references: `align(N)` fields in `packed(N)` structs are fine](https://github.com/rust-lang/rust/pull/83605) |
| 110 | +* [prevent very long compilation runtimes in `LateBoundRegionNameCollector`](https://github.com/rust-lang/rust/pull/83406) |
| 111 | +* [reduce the impact of `Vec::reserve` calls that do not cause any allocation](https://github.com/rust-lang/rust/pull/83357) |
| 112 | +* [BTree: no longer search arrays twice to check `Ord`](https://github.com/rust-lang/rust/pull/83267) |
| 113 | +* [stream the dep-graph to a file instead of storing it in-memory](https://github.com/rust-lang/rust/pull/82780) |
| 114 | +* [implement `SourceIterator` and `InPlaceIterable` for `ResultShunt`](https://github.com/rust-lang/rust/pull/81619) |
| 115 | +* [optimize jumps in `PartialOrd::le`](https://github.com/rust-lang/rust/pull/83819) |
| 116 | +* [`ffi::c_str` removed bound checks on `as_bytes`, `to_bytes`](https://github.com/rust-lang/rust/pull/83609) |
| 117 | +* [added `as_slice` method to `BinaryHeap` collection](https://github.com/rust-lang/rust/pull/82331) |
| 118 | +* [use `#[inline(always)]` on trivial `UnsafeCell` methods](https://github.com/rust-lang/rust/pull/83858) |
| 119 | +* [add `#[inline]` to `IpAddr` methods](https://github.com/rust-lang/rust/pull/83831) |
| 120 | +* [disallow octal format in Ipv4 string](https://github.com/rust-lang/rust/pull/83652) |
| 121 | +* [constify methods of `std::net::SocketAddr`, `SocketAddrV4` and `SocketAddrV6`](https://github.com/rust-lang/rust/pull/82487) |
| 122 | +* [constify some slice methods](https://github.com/rust-lang/rust/pull/83571) |
| 123 | +* [stdsimd: add saturating abs/neg](https://github.com/rust-lang/stdsimd/pull/87) |
| 124 | +* [hashbrown: make `RawTable::insert_no_grow` unsafe](https://github.com/rust-lang/hashbrown/pull/254) |
| 125 | +* [cargo: add cargo config subcommand](https://github.com/rust-lang/cargo/pull/9302) |
| 126 | +* [rustdoc: only look at blanket impls in `get_blanket_impls`](https://github.com/rust-lang/rust/pull/83681) |
| 127 | +* [rustdoc: add unstable option to only emit shared/crate-specific files](https://github.com/rust-lang/rust/pull/83478) |
| 128 | +* [rustdoc: don't enter an `infer_ctxt` in `get_blanket_impls` for impls that aren't blanket impls](https://github.com/rust-lang/rust/pull/82864) |
| 129 | +* [rustdoc: highlight macros more efficiently](https://github.com/rust-lang/rust/pull/83793) |
| 130 | +* [clippy: add `non_octal_unix_permissions` lint](https://github.com/rust-lang/rust-clippy/pull/7001) |
| 131 | +* [clippy: don't lint `manual_map` in const functions](https://github.com/rust-lang/rust-clippy/pull/6976) |
| 132 | +* [clippy: new Lint: `needless_for_each`](https://github.com/rust-lang/rust-clippy/pull/6706) |
| 133 | +* [clippy: new Lint: `branches_sharing_code`](https://github.com/rust-lang/rust-clippy/pull/6463) |
| 134 | +* [clippy: lint: `filter(Option::is_some).map(Option::unwrap)`](https://github.com/rust-lang/rust-clippy/pull/6342) |
| 135 | +* [clippy: remove author requirement for `cargo_common_metadata`](https://github.com/rust-lang/rust-clippy/pull/7026) |
| 136 | +* [Clippy going dark: adding a dark theme to Clippy's lint list](https://github.com/rust-lang/rust-clippy/pull/7030) |
| 137 | +* [crates.io: topologically sort `db-dump.tar.gz`](https://github.com/rust-lang/crates.io/pull/3409) |
| 138 | +* [parallelize tidy](https://github.com/rust-lang/rust/pull/82347) |
| 139 | + |
| 140 | +## Rust Compiler Performance Triage |
| 141 | + |
| 142 | +A pretty major week for [memory usage improvements] with an average of ~20% gains on memory usage for |
| 143 | +release builds, and 5% on check builds, due to an update in the default allocator |
| 144 | +used (to a more recent jemalloc). Wall time performance remained largely unchanged over this week. |
| 145 | + |
| 146 | +Triage done by **@simulacrum**. |
| 147 | +Revision range: [4896450e..d32238](https://perf.rust-lang.org/?start=4896450e7e0a522486b4d3a8d360ac4e1d2072a0&end=d32238532138485c80db4f2cd596372bce214e00&absolute=false&stat=instructions%3Au) |
| 148 | + |
| 149 | +[memory usage improvements]: https://perf.rust-lang.org/?start=4896450e7e0a522486b4d3a8d360ac4e1d2072a0&end=d32238532138485c80db4f2cd596372bce214e00&absolute=false&stat=max-rss |
| 150 | + |
| 151 | +1 Regressions, 4 Improvements, 0 Mixed |
| 152 | + |
| 153 | +## Approved RFCs |
| 154 | + |
| 155 | +Changes to Rust follow the Rust [RFC (request for comments) process](https://github.com/rust-lang/rfcs#rust-rfcs). These |
| 156 | +are the RFCs that were approved for implementation this week: |
| 157 | + |
| 158 | +* [RFC: Declarative macro metavariable expressions](https://github.com/rust-lang/rfcs/pull/3086) |
| 159 | + |
| 160 | +## Final Comment Period |
| 161 | + |
| 162 | +Every week [the team](https://www.rust-lang.org/team.html) announces the |
| 163 | +'final comment period' for RFCs and key PRs which are reaching a |
| 164 | +decision. Express your opinions now. |
| 165 | + |
| 166 | +### [RFCs](https://github.com/rust-lang/rfcs/labels/final-comment-period) |
| 167 | + |
| 168 | +* [disposition: close] [RFC: Structural Records](https://github.com/rust-lang/rfcs/pull/2584) |
| 169 | +* [disposition: postpone] [Hygiene opt-out (escaping) for declarative macros 2.0](https://github.com/rust-lang/rfcs/pull/2498) |
| 170 | +* [disposition: postpone] [RFC: Delegation](https://github.com/rust-lang/rfcs/pull/2393) |
| 171 | +* [disposition: close] [RFC: `#[derive_no_bound(..)]` and `#[derive_field_bound(..)]`](https://github.com/rust-lang/rfcs/pull/2353) |
| 172 | +* [disposition: postpone] [RFC: Eager Macro Expansion](https://github.com/rust-lang/rfcs/pull/2320) |
| 173 | +* [disposition: merge] [try_trait_v2: A new design for the `?` desugaring](https://github.com/rust-lang/rfcs/pull/3058) |
| 174 | + |
| 175 | +### [Tracking Issues & PRs](https://github.com/rust-lang/rust/labels/final-comment-period) |
| 176 | + |
| 177 | +* [disposition: merge] [Remove `T: Debug` bound on UnsafeCell Debug impl](https://github.com/rust-lang/rust/pull/83707) |
| 178 | +* [disposition: merge] [Turn old edition lint (anonymous-parameters) into warn-by-default on 2015](https://github.com/rust-lang/rust/pull/82918) |
| 179 | +* [disposition: merge] [Stabilize `rustdoc::bare_urls` lint](https://github.com/rust-lang/rust/pull/81764) |
| 180 | +* [disposition: merge] [Tracking issue: fNN::is_subnormal](https://github.com/rust-lang/rust/issues/79288) |
| 181 | +* [disposition: merge] [Tracking Issue for feature(nonzero_leading_trailing_zeros)](https://github.com/rust-lang/rust/issues/79143) |
| 182 | +* [disposition: merge] [Tracking Issue for `{BTreeMap,BTreeSet}::retain`](https://github.com/rust-lang/rust/issues/79025) |
| 183 | +* [disposition: merge] [Tracking Issue for `#![feature(const_cell_into_inner)]`](https://github.com/rust-lang/rust/issues/78729) |
| 184 | +* [disposition: merge] [Tracking Issue for `atomic_fetch_update`](https://github.com/rust-lang/rust/issues/78639) |
| 185 | +* [disposition: merge] [Tracking Issue for feature: "option_insert"](https://github.com/rust-lang/rust/issues/78271) |
| 186 | +* [disposition: merge] [Tracking Issue for `Duration` saturating operations](https://github.com/rust-lang/rust/issues/76416) |
| 187 | +* [disposition: merge] [Tracking Issue for `Duration::{zero, is_zero} (#![feature(duration_zero)])`](https://github.com/rust-lang/rust/issues/73544) |
| 188 | +* [disposition: close] [Tracking issue for FixedSizeArray trait](https://github.com/rust-lang/rust/issues/27778) |
| 189 | + |
| 190 | +## New RFCs |
| 191 | + |
| 192 | +* [RFC: Reserved prefixes in the 2021 edition](https://github.com/rust-lang/rfcs/pull/3101) |
| 193 | + |
| 194 | +# Upcoming Events |
| 195 | + |
| 196 | +### Online |
| 197 | +* [April 7, Johannesburg, ZA - Monthly Joburg Rust Chat! - Johannesburg Rust Meetup](https://www.meetup.com/Johannesburg-Rust-Meetup/events/277133126/) |
| 198 | +* [April 7, Indianapolis, IN, US - Indy.rs - with Social Distancing - Indy Rust](https://www.meetup.com/indyrs/events/jhfstryccgbkb/) |
| 199 | +* [April 12, Denver, CO, US - Building Delightful CLI Tools in Rust by Chuck Pierce - Rust Denver](https://www.meetup.com/Rust-Boulder-Denver/events/276801410/) |
| 200 | +* [April 13, Seattle, WA, US - Monthly Meetup - Seattle Rust Meetup](https://www.meetup.com/Seattle-Rust-Meetup/events/gskksryccgbrb/) |
| 201 | +* [April 13, Saarbrücken, Saarland, DE - **Rust Saar** 10u16](https://www.meetup.com/de-DE/Rust-Saar/events/276873622/) |
| 202 | +* [April 20, Washington, DC, US - The Rust Borrow Checker—A Deep Dive - Rust DC](https://www.meetup.com/RustDC/events/ntvrgsyccgblb) |
| 203 | + |
| 204 | +### North America |
| 205 | + |
| 206 | +* [April 8, Columbus, OH, US - Monthly Meetup - Columbus Rust Society](https://www.meetup.com/columbus-rs/events/dpkhgryccgblb/) |
| 207 | +* [April 14, Atlanta, GA, US - Grab a beer with fellow Rustaceans - Rust Atlanta](https://www.meetup.com/Rust-ATL/events/qxqdgryccgbsb/) |
| 208 | + |
| 209 | +### Asia Pacific |
| 210 | +* [April 19, Wellington, NZ - IGNITION: What is Rust and why should I care? Rust at work & at play - Rust Wellington](https://www.meetup.com/Rust-Wellington/events/277270667) |
| 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 | +**IOTA Foundation** |
| 222 | + |
| 223 | +* [IOTA Identity Software Engineer - Rust (Remote)](https://iota.bamboohr.com/jobs/view.php?id=143&source=other) |
| 224 | + |
| 225 | +**Parity Technologies** |
| 226 | + |
| 227 | +* [Blockchain Developer - Cross Chain Messaging (Remote)](https://grnh.se/9aec49883us) |
| 228 | +* [Numerous other Rust engineering openings](https://www.parity.io/jobs/) |
| 229 | + |
| 230 | +**Microsoft** |
| 231 | + |
| 232 | +* [Azure IoT Senior Software Engineer (remote possible within U.S.)](https://careers.microsoft.com/us/en/job/960784/Senior-Software-Engineer) |
| 233 | + * Junior developers should also apply but relocation to Redmond is necessary in that case. |
| 234 | + |
| 235 | +**Wallaroo** |
| 236 | + |
| 237 | +* [Software Engineer (Remote)](https://wallaroo.breezy.hr/p/30939dc4e5c7-software-engineer) |
| 238 | + |
| 239 | +*Tweet us at [@ThisWeekInRust](https://twitter.com/ThisWeekInRust) to get your job offers listed here!* |
| 240 | + |
| 241 | +# Quote of the Week |
| 242 | + |
| 243 | +Sadly there was no quote nominated for this week. |
| 244 | + |
| 245 | +[Please submit quotes and vote for next week!](https://users.rust-lang.org/t/twir-quote-of-the-week/328) |
| 246 | + |
| 247 | +*This Week in Rust is edited by: [nellshamrell](https://github.com/nellshamrell), [llogiq](https://github.com/llogiq), and [cdmistman](https://github.com/cdmistman).* |
| 248 | + |
| 249 | +<small>[Discuss on r/rust](https://www.reddit.com/r/rust/comments/k5nsab/this_week_in_rust_367/)</small> |
0 commit comments