emacs/var/elfeed/db/data/c3/c327824957181dc04078bdfac44f9a9d7f6daddf
2022-01-03 12:49:32 -06:00

208 lines
19 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>Hello and welcome to another issue of <em>This Week in Rust</em>!
<a href="http://rust-lang.org">Rust</a> 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 <a href="https://twitter.com/ThisWeekInRust">@ThisWeekInRust</a> or <a href="https://github.com/rust-lang/this-week-in-rust">send us a pull request</a>.
Want to get involved? <a href="https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md">We love contributions</a>.</p>
<p><em>This Week in Rust</em> is openly developed <a href="https://github.com/rust-lang/this-week-in-rust">on GitHub</a>.
If you find any errors in this week's issue, <a href="https://github.com/rust-lang/this-week-in-rust/pulls">please submit a PR</a>.</p>
<h2 id="updates-from-rust-community">Updates from Rust Community</h2>
<h3 id="official">Official</h3>
<ul>
<li><a href="https://blog.rust-lang.org/inside-rust/2021/11/25/in-response-to-the-moderation-team-resignation.html">In response to the moderation team resignation</a></li>
<li><a href="https://blog.rust-lang.org/inside-rust/2021/11/30/1.57.0-prerelease.html">1.57.0 pre-release testing</a></li>
</ul>
<h3 id="projecttooling-updates">Project/Tooling Updates</h3>
<ul>
<li><a href="https://rust-analyzer.github.io//thisweek/2021/11/29/changelog-105.html">Rust Analyzer Changelog #105</a></li>
<li><a href="https://sixtyfps.io/thisweek/2021-11-29.html">SixtyFPS (GUI crate): Changelog for 28th of November 2021 0.1.15 Release</a></li>
<li><a href="https://weekly.databend.rs/2021-12-01-databend-weekly/">This week in Databend #18: an elastic and reliable cloud warehouse</a></li>
<li><a href="https://wasmer.io/posts/wasmer-2.1">Wasmer 2.1</a></li>
<li><a href="https://gitlab.com/wyrcan/wyrcan">Wyrcan ~ The Container Bootloader</a></li>
<li><a href="https://www.fluvio.io/news/this-week-in-fluvio-0015/">This week in Fluvio #15: the programmable streaming platform</a></li>
</ul>
<h3 id="observationsthoughts">Observations/Thoughts</h3>
<ul>
<li><a href="https://www.ralfj.de/blog/2021/11/24/ub-necessary.html">Do we Really Need Undefined Behavior?</a></li>
<li><a href="https://matklad.github.io//2021/11/27/notes-on-module-system.html">Notes On Module System</a></li>
<li><a href="https://njk.onl/blog/gaffer.html">A prioritised micro-batch scheduler in rust</a></li>
<li><a href="https://dev.to/mark_saward/go-footguns-go-defer-and-rust-drop-17af">Go footguns: Go Defer and Rust Drop</a></li>
<li><a href="https://blog.yossarian.net/2021/11/29/LLVM-internals-part-4-attributes-and-attribute-groups">LLVM internals, part 4: attributes and attribute groups</a></li>
<li><a href="https://eevans.co/blog/wraft/">Implementing Raft for Browsers with Rust and WebRTC</a></li>
<li><a href="https://oxide.computer/blog/hubris-and-humility">Hubris and Humility</a></li>
<li>[ZH] <a href="https://dev.to/daniel1in/zero-cost-abstractions-in-rust-5e41">Zero-Cost Abstractions in Rust</a></li>
<li>[audio] <a href="https://rustacean-station.org/episode/048-herbert-wolverson/">Game Development with Herbert Wolverson</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=bejThbzAYOA">Rust Linz, November 2021 - Advent of Code by Rainer Stropek with Fred Morcos</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=UhZGYS13twc">Rust Linz, November 2021 - Serde Shenanigans by Armin Ronacher</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=o6qe4lw9-8c">Rust Linz, November 2021 - WebAssembly beyond the browser by Thorsten Hans</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=uIeIBlB0JFw">Rust 2021 Edition Explained</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=DGbsHENouy4">Mats Kindahl: A C++ programmer's view on Rust</a></li>
</ul>
<h3 id="rust-walkthroughs">Rust Walkthroughs</h3>
<ul>
<li><a href="https://kerkour.com/black-hat-rust-week-2021/">Black Hat Week (Black Hat Rust is out 🍾)</a></li>
<li><a href="https://www.joshfinnie.com/blog/using-webassembly-created-in-rust-for-fast-react-components/">Using WebAssembly (created in Rust) for Fast React Components</a></li>
<li><a href="https://kflansburg.com/posts/rust-cachepot/">Speed up Rust Builds with Cachepot</a></li>
<li><a href="https://veera.app/rena%27s_memory_model.html">Renas Memory Model</a></li>
<li><a href="https://levelup.gitconnected.com/how-to-build-a-note-taking-command-line-application-with-rust-part-1-34b9cd5be6b9">How to Build a Note Taking Command Line Application With Rust: Part 1</a></li>
<li><a href="https://phychic-owl.medium.com/rust-project-ping-pong-game-665766cc45ed">Rust Project: Ping Pong Game</a></li>
<li><a href="https://www.freecodecamp.org/news/rust-in-replit/">Learn Rust Programming Course Interactive Rust Language Tutorial on Repl.it</a></li>
<li><a href="https://kerkour.com/rust-position-independent-shellcode/">Position Independent Shellcodes in Rust (PIC)</a></li>
<li><a href="https://medium.com/pragmatic-programmers/run-your-rust-games-in-a-browser-ceea86b04616">Run Your Rust Games in a Browser</a></li>
<li><a href="https://dev.to/calebsander/git-internals-part-2-packfiles-1jg8">Git Internals part 2: packfiles</a></li>
<li><a href="https://dev.to/fndomendez/building-a-simple-on-chain-point-of-sale-with-solana-anchor-and-react-859">Building a simple on-chain point of sale with Solana, Anchor and React</a></li>
<li><a href="https://erayerdin.com/checking-unused-dependencies-in-a-rust-project-with-github-actions-ckwm3yov901cwlvs1h48z54xi">Checking Unused Dependencies in a Rust Project with Github Actions</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=U_XGkDZcV1k">rg3d - live coding session #3</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=4y1aRPiH9Ko">The Ray Tracer Challenge - 022 - Planes</a></li>
<li>[PL] [video] <a href="https://www.youtube.com/watch?v=q2lWUmAKsVQ">Rust na raz #2: Ugliest workaround for unsafe</a></li>
</ul>
<h3 id="miscellaneous">Miscellaneous</h3>
<ul>
<li><a href="https://www.theregister.com/2021/11/30/aws_reinvent_rust/">Can Rust save the planet? Why, and why not</a></li>
<li><a href="https://blog.asciinema.org/post/smaller-faster/">4x smaller, 50x faster</a></li>
<li>[PT] <a href="https://github.com/luisvonmuller/Esta-Semana-Em-Rust/blob/main/%23418.md">Esta-Semana-Em-Rust #418</a></li>
<li>[video] <a href="https://www.youtube.com/watch?v=pQmL71xAzIk">RCIG Sync-up call #6</a></li>
</ul>
<h2 id="crate-of-the-week">Crate of the Week</h2>
<p>This week's crate is <a href="https://crates.io/crates/poem-openapi">poem-openapi</a>, a framework to implement OpenAPI services.</p>
<p>llogiq is very pleased with his suggestion.</p>
<p><a href="https://users.rust-lang.org/t/crate-of-the-week/2704">Please submit your suggestions and votes for next week</a>!</p>
<h2 id="call-for-participation">Call for Participation</h2>
<p>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!</p>
<p>Some of these tasks may also have mentors available, visit the task page for more information.</p>
<ul>
<li><a href="https://github.com/rusty-celery/rusty-celery">rusty-celery is looking for maintainers</a></li>
</ul>
<p><strong>Ockam</strong></p>
<ul>
<li><a href="https://github.com/ockam-network/ockam/issues/2288">Move the ockam_vault_core create into ockam_core</a></li>
<li><a href="https://github.com/ockam-network/ockam/issues/2291">Move the ockam_key_exchange_core create into ockam_core</a></li>
<li><a href="https://github.com/ockam-network/ockam/issues/2287">Delete the ockam_node_no_std crate</a></li>
</ul>
<p>If you are a Rust project owner and are looking for contributors, please submit tasks <a href="https://users.rust-lang.org/t/twir-call-for-participation/4821">here</a>.</p>
<h2 id="updates-from-the-rust-project">Updates from the Rust Project</h2>
<p>244 pull requests were <a href="https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2021-11-22..2021-11-29">merged in the last week</a></p>
<ul>
<li><a href="https://github.com/rust-lang/rust/pull/84197">add codegen option for using LLVM stack smash protection</a></li>
<li><a href="https://github.com/rust-lang/compiler-builtins/pull/442">do not use atomic reads on platforms without atomic support in LLVM</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/85102">diagnostic tweaks</a></li>
<li><a href="https://github.com/rust-lang/chalk/pull/709">chalk: introduce <code>Folder::Error</code></a></li>
<li><a href="https://github.com/rust-lang/miri/pull/1923">miri: more portable SIMD: rem, shl, shr</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91212">fix ICE due to out-of-bounds statement index when reporting borrowck error</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91308">fix ICE when lowering <code>trait A where for&lt;'a&gt; Self: 'a</code></a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91246">faster <code>Layout::array</code></a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91230">make <code>TypeFolder::fold_*</code> return <code>Result</code></a></li>
<li><a href="https://github.com/rust-lang/rust/pull/89542">partially stabilize <code>duration_consts_2</code></a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91301">stabilize <code>nonzero_is_power_of_two</code></a></li>
<li><a href="https://github.com/rust-lang/rust/pull/90896">stabilize some <code>MaybeUninit</code> behavior as const</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91043">add fast path to <code>is_descendant_of</code></a></li>
<li><a href="https://github.com/rust-lang/futures-rs/pull/2520">futures: remove dependency on proc-macro-hack</a></li>
<li><a href="https://github.com/rust-lang/cargo/pull/10130">cargo: improve unused patch message when source URLs mismatched</a></li>
<li><a href="https://github.com/rust-lang/rust-clippy/pull/7995">clippy: add <code>needless_late_init</code> lint</a></li>
<li><a href="https://github.com/rust-lang/rust-clippy/pull/8028">clippy: add more descriptive help info for <code>needless_question_mark</code></a></li>
<li><a href="https://github.com/rust-lang/rust-clippy/pull/7980">clippy: fix false positive on <code>if_then_some_else_none</code> with early return</a></li>
<li><a href="https://github.com/rust-lang/rust-clippy/pull/8001">clippy: improve <code>strlen_on_c_string</code></a></li>
<li><a href="https://github.com/rust-lang/rust-clippy/pull/8034">clippy: extend <code>non_ascii_literal</code> to cover chars</a></li>
<li><a href="https://github.com/rust-lang/rust-clippy/pull/8006">clippy: apply iter_cloned_collect to collect() using copied()</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/91094">rustdoc: avoid documenting top-level private imports</a></li>
<li><a href="https://github.com/rust-lang/rustfmt/pull/5096">rustfmt: fix: do not wrap reference-style doc links</a></li>
<li><a href="https://github.com/rust-lang/rustfmt/pull/5113">rustfmt: maintain more AST info when formatting a RHS</a></li>
</ul>
<h3 id="rust-compiler-performance-triage">Rust Compiler Performance Triage</h3>
<p>Overall, many changes this week, but overall an improvement on multiple benchmarks over
the week from a number of pull requests dedicated to optimizations of certain
patterns. We are still seeing a large number of spurious changes due to
<a href="https://github.com/rust-lang/rustc-perf/issues/1105">rustc-perf#1105</a>, which
has yet to be addressed.</p>
<p>Triage done by <strong>@simulacrum</strong>.
Revision range: <a href="https://perf.rust-lang.org/?start=22c2d9ddbf356bcdb718e88ca6ee3665e1e42690&amp;end=1c0287830e0fb3c4007afea2819ba03766da6e9c&amp;absolute=false&amp;stat=instructions%3Au">22c2d9d..1c028783</a></p>
<p>4 Regressions, 4 Improvements, 9 Mixed; 5 of them in rollups
41 comparisons made in total</p>
<p><a href="https://github.com/rust-lang/rustc-perf/blob/master/triage/2021-11-30.md">Full report here</a></p>
<h3 id="approved-rfcs"><a href="https://github.com/rust-lang/rfcs/commits/master">Approved RFCs</a></h3>
<p>Changes to Rust follow the Rust <a href="https://github.com/rust-lang/rfcs#rust-rfcs">RFC (request for comments) process</a>. These
are the RFCs that were approved for implementation this week:</p>
<ul>
<li><em>No RFCs were approved this week.</em></li>
</ul>
<h3 id="final-comment-period">Final Comment Period</h3>
<p>Every week <a href="https://www.rust-lang.org/team.html">the team</a> announces the
'final comment period' for RFCs and key PRs which are reaching a
decision. Express your opinions now.</p>
<h4 id="rfcs"><a href="https://github.com/rust-lang/rfcs/labels/final-comment-period">RFCs</a></h4>
<ul>
<li><em>No RFCs entered final comment period this week.</em></li>
</ul>
<h4 id="tracking-issues-prs"><a href="https://github.com/rust-lang/rust/labels/final-comment-period">Tracking Issues &amp; PRs</a></h4>
<ul>
<li>[disposition: merge] <a href="https://github.com/rust-lang/rust/issues/91260">rustdoc: accept --out-dir and soft-deprecate --output</a></li>
<li>[disposition: merge] <a href="https://github.com/rust-lang/rust/issues/74479">Tracking Issue for #![feature(available_parallelism)]</a></li>
</ul>
<h3 id="new-rfcs"><a href="https://github.com/rust-lang/rfcs/pulls">New RFCs</a></h3>
<ul>
<li><a href="https://github.com/rust-lang/rfcs/pull/3201">RFC: Attributes in function return type position</a></li>
<li><a href="https://github.com/rust-lang/rfcs/pull/3200">RFC: proc macro include!</a></li>
<li><a href="https://github.com/rust-lang/rfcs/pull/3199">RFC: Unsafe Lifetime</a></li>
</ul>
<h2 id="upcoming-events">Upcoming Events</h2>
<p>Rusty Events between 12/01-12/15 🦀</p>
<h3 id="online">Online</h3>
<ul>
<li><a href="https://www.meetup.com/NewSpace-NYC/events/282320805">December 3, 2021 | New York City, NY, US | <strong>Getting started in aerospace with Rust 🦀</strong> | NewSpace NYC</a>.</li>
<li><a href="https://www.meetup.com/Buffalo-Rust-Meetup/events/281833990/">December 7, 2021 | Buffalo, NY, US | <strong>First Tuesdays</strong> | Buffalo Rust Meetup</a></li>
<li><a href="https://www.meetup.com/Los-Gatos-Rust-Reading-Group/events/281966245">December 8, 2021 | Los Gatos, CA, US | <strong>Book #24 - Rust for Rustaceans - Chapter 1</strong> | Los Gatos Reading Group</a></li>
<li><a href="https://www.meetup.com/Rust-Los-Angeles/events/281944671/">December 8, 2021 | Los Angeles, CA, US | <strong>Rust Computer Vision Project with Geordon Worley</strong> | Rust Los Angeles</a></li>
<li><a href="https://www.meetup.com/Rust-Community-Stuttgart/events/282009864">December 8, 2021 | Stuttgart, DE | <strong>Rust-Meetup</strong> | Rust Community Stuttgart</a></li>
<li><a href="https://www.meetup.com/8th-light-university/events/282381279">December 10, 2021 | Chicago, IL, US | <strong>8LU Keynote by Eric Smith - Write Your Game in Rust!</strong> | 8th Light University</a></li>
<li><a href="https://www.meetup.com/Seattle-Rust-Meetup/events/281875277">December 14, 2021 | Seattle, WA, US | <strong>Monthly Meetup</strong> | Seattle Rust Meetup</a></li>
</ul>
<h3 id="north-america">North America</h3>
<ul>
<li><a href="https://www.meetup.com/Rust-ATL/events/lhpkmsyccqblb/">December 8, 2021 | Atlanta, GA, US | <strong>Grab a beer with fellow Rustaceans</strong> | Rust Atlanta</a></li>
</ul>
<h3 id="europe">Europe</h3>
<ul>
<li><a href="https://rustcon.ru">December 3, 2021 | Moscow, RU | <strong>Rust Con</strong> | RustCon.ru</a></li>
</ul>
<p>If you are running a Rust event please add it to the <a href="https://www.google.com/calendar/embed?src=apd9vmbc22egenmtu5l6c5jbfc%40group.calendar.google.com">calendar</a> to get
it mentioned here. Please remember to add a link to the event too.
Email the <a href="mailto:community-team@rust-lang.org">Rust Community Team</a> for access.</p>
<h1 id="rust-jobs">Rust Jobs</h1>
<p><strong>Tangram</strong></p>
<ul>
<li><a href="https://www.tangram.dev/jobs">Rust Developer (Remote)</a></li>
</ul>
<p><strong>Flaps</strong></p>
<ul>
<li><a href="https://www.linkedin.com/jobs/view/2818309506/">Rust developer &amp; distributed systems (Remote)</a></li>
</ul>
<p><strong>CoBloX</strong></p>
<ul>
<li><a href="https://comit.network/blog/2021/03/01/we-are-hiring/">Software Engineer (Sydney, AU or Remote with 5h overlap with UTC+10 (AEST)</a></li>
</ul>
<p><strong>Globelise</strong></p>
<ul>
<li><a href="https://www.techinasia.com/jobs/75de79c7-492d-4493-b247-1315979227bc">Backend Engineer (Remote)</a></li>
</ul>
<p><strong>Bionaut Labs</strong></p>
<ul>
<li><a href="https://www.indeed.com/viewjob?jk=9cda3e340d35e515">Embedded Software Engineer (Senior) (Los Angeles, CA, US)</a></li>
<li><a href="https://www.indeed.com/viewjob?jk=5b14daa53cc356d2">Embedded Software Engineer (Junior) (Los Angeles, CA)</a></li>
</ul>
<p><strong>Massa Labs</strong></p>
<ul>
<li><a href="https://massa.net/jobs.html">Several Rust Engineering Positions Available</a></li>
</ul>
<p><em>Tweet us at <a href="https://twitter.com/ThisWeekInRust">@ThisWeekInRust</a> to get your job offers listed here!</em></p>
<h1 id="quote-of-the-week">Quote of the Week</h1>
<blockquote>
<p>The design of the safe/unsafe split means that there is an asymmetric trust relationship between Safe and Unsafe Rust. Safe Rust inherently has to trust that any Unsafe Rust it touches has been written correctly. On the other hand, Unsafe Rust cannot trust Safe Rust without care.</p>
<p>As an example, Rust has the <a href="https://doc.rust-lang.org/nightly/std/cmp/trait.PartialOrd.html"><code>PartialOrd</code></a> and <a href="https://doc.rust-lang.org/nightly/std/cmp/trait.Ord.html"><code>Ord</code></a> traits to differentiate between types which can "just" be compared, and those that provide a "total" ordering (which basically means that comparison behaves reasonably).</p>
<p><a href="https://doc.rust-lang.org/nightly/std/collections/struct.BTreeMap.html"><code>BTreeMap</code></a> doesn't really make sense for partially-ordered types, and so it requires that its keys implement <code>Ord</code> . However, <code>BTreeMap</code> has Unsafe Rust code inside of its implementation. Because it would be unacceptable for a sloppy <code>Ord</code> implementation (which is Safe to write) to cause Undefined Behavior, the Unsafe code in BTreeMap must be written to be robust against <code>Ord</code> implementations which aren't actually total — even though that's the whole point of requiring <code>Ord</code> .</p>
</blockquote>
<p> <a href="https://github.com/rust-lang/rfcs/pull/3197#issuecomment-976032253">Gankra citing the Rustonomicon on github</a></p>
<p>Thanks to <a href="https://users.rust-lang.org/t/twir-quote-of-the-week/328/1144">robin</a> for the suggestion!</p>
<p><a href="https://users.rust-lang.org/t/twir-quote-of-the-week/328">Please submit quotes and vote for next week!</a></p>
<p><em>This Week in Rust is edited by: <a href="https://github.com/nellshamrell">nellshamrell</a>, <a href="https://github.com/llogiq">llogiq</a>, <a href="https://github.com/cdmistman">cdmistman</a>, <a href="https://github.com/ericseppanen">ericseppanen</a>, <a href="https://github.com/extrawurst">extrawurst</a>, <a href="https://github.com/andrewpollack">andrewpollack</a>, <a href="https://github.com/U007D">U007D</a>, <a href="https://github.com/kolharsam">kolharsam</a>, <a href="https://github.com/joelmarcey">joelmarcey</a>, <a href="https://github.com/marriannegoldin">marriannegoldin</a>.</em></p>
<p><em>Email list hosting is sponsored by <a href="https://foundation.rust-lang.org/">The Rust Foundation</a></em></p>
<p><small><a href="https://www.reddit.com/r/rust/comments/r6wnr7/this_week_in_rust_419/">Discuss on r/rust</a></small></p>