This Week in Rust - Issue 351Back to Episode Page
This Week in Rust 350
Nell Shamrell-Harrington: Hello Rustaceans and welcome to another episode of This Week in Rust here on the Rustacean Station.
As always, I’m Nell Shamrell-Harrington, lead editor of This Week in Rust and also a Sr. Staff Research Engineer on the Rust team at Mozilla.
This episode covers issue number 351 of This Week in Rust, published on August 11, 2020.
After going through this week’s news, we will continue our interview series with speakers of the upcoming RustConf. This week we will hear from Micah Tigley, Rebecca Turner, and Samuel Lim. Each speaker will introduce themselves and give you a brief preview of their talk at the end of this episode.
First, the news.
At the time of this recording, there were no official Rust related announcements this week.
In terms of tooling, both Rust Analyzer and IntelliJ Rust have released new versions. As a reminder, Rust Analyzer and IntelliJ Rust are Rust language plugins for integrated development environments, or IDEs. The difference is that IntelliJ Rust focuses on IntelliJ-based IDEs, while Rust Analyzer focuses on IDEs like VS Code, and editors like Emacs, and Vim. Both are extensively used by the Rust community, check out the changelogs for all the latest updates.
Next, several newsletters covering specialized areas of the Rust ecosystem were released this week. Check out This Month in Rust Gamedev and Rust in Blockchain for lots of great content on those topics.
If you are interested in observations and thoughts on the Rust language from your fellow Rustaceans, make sure you look at the Observations and Thoughts section of this week’s issue. This includes an interview with Rust Core Team member Steve Klabnick by evrone, an article on the Beyond the Loop blog on why learning Rust is great as a second language, a Spanish language article on why the author likes Rust so much, and more.
Moving onto our largest section - the learning section- now divided into its own subsections. We continue to see so much fantastic content on learning both the Rust language and the Rust ecosystem.
If you are looking for advice on testing async Rust code, be sure to read “Two Easy Ways to Test Async Functions in Rust” by Claus Matzinger. In order to work with Async functions in Rust, you need to use an async runtime like Tokio. Rust’s built in tests do not come with a runtime, at least not yet. If you are using a framework like actix-web, the framework might include testing support via an additional attribute. For projects that do not use a web framework, you can use a testing runtime like tokio-test. Tokio-test includes a function to “reverse” what async functions do and block the execution until the async function has returned. This allows you to verify that these functions do what you expect them to do. See the full article for several examples.
Along with testing, this week’s newsletter also features an article on refactoring Rust code by Philip Daniels. Daniels’ article “Cloning yourself — a refactoring for thread-spawning Rust types” will take you through refactoring a piece of code that starts with, among other things, an Arc within an Arc, and ends in a much more readable and maintainable place.
If you are intrigued by how Rust manages memory, you will like Ivan Veselov’s new blog entry titled “Allocation API, allocators and virtual memory”. This article explores allocators in general and their Rust API in particular. Definitely give it a read for an in depth intro to memory allocations and how Rust uses them.
This week’s issue also features a Portugues article on learning Rust by Rodolofo Ghiggi.
Luca Palmieri has published Chapter 3 of the “Zero to Production” series. This series is focused on API development in Rust. This chapter covers bootstrapping a Rust Web API from scratch. It includes information on choosing a web framework, creating a basic health check endpoint, and writing an integration test. I have enjoyed watching this series progress and am looking forward to future entries.
One area of content I have seen explode this year is Rust related videos and livestreams. The Crust of Rust series by Jon Gjengset is particularly fantastic. In the latest entry, in Jon’s own words “we cover multi-produce/single-consumer (mpsc) channels, by re-implementing some of the std::sync::mpsc types from the standard library. As part of that, we cover what channels are used for, how they work at a high level, different common channel variants, and common channel implementations. In the process, we go over some common Rust concurrency primitives like Mutex and Condvar.”
If you are interested in Embedded Rust, check out a recording of a live stream by James Munns, Steve Klabnick, and Michael Gattozzi as they mob program together in Rust. In this process, they use a new project from Ferrous Systems called Knurling - that K-N-U-R-L-I-N-G - rs.
Moving on to Call for Participation, several Rust open source projects are looking for contributors. These include Cargo — Rust’s dependency manager, dotenv-linter — which, as the name suggests, lints .env files, ruma — a set of Rust library crates for working with the Matrix online communication protocol, tensorbase — a modern engineering effort for building a high performance and cost-effective big data warehouse, and Libra SOC — a project that, in it’s own words, allows you to “take complex algorithms usually intended for power hungry servers with big fat GPUs, and run them on tiny devices like smartwatches, cellphones, and pocket drones without changing your code at all”.
Moving onto RFCs, it’s a somewhat quiet week with no RFCs approved and none in final comment period. However, three new RFCs were proposed this week.
The first is a “Proposal for POSIX error numbers in std::os::unix.” This RFC proposes adding a std::os::unix::ErrorNumber struct for storing and comparing POSIX error numbers.
Next, the proposal titled “Standardize methods for leaking containers” which describes a standard set of methods for converting container types like Box, Arc, Vec, and String to and from raw pointers.
Finally, the last RFC introduces the self macro metavariable as a companion to the crate macro metavariable. The self macro metavariable would allow macros hygienic access to items.
For full details on all of these RFCs, along with the current discussion, make sure to view them on GitHub.
As for Rust jobs — equilibrium, DerivaDEX, and CasperLabs are all looking for Rust engineers. See the newsletter for the links to the job postings for all the information.
Moving on to events, lots of meetups are happening around the world including online ones in Saarbrücken, Germany, Dallas, Texas, San Diego, California, and Vancouver, British Columbia. There are also currently in person meetups scheduled in Columbus, Ohio, Dallas, Texas, and Seoul, South Korea.
Finally, make sure not to miss RustConf, taking place online, on August 20. And that’s a great transition into our interviews with the RustConf speakers.
This week we hear from Micah Tigley, Rebecca Turner, and Samuel Lim.
Let’s start with Micah Tigley.
(Interview transcript to be added)
Now, let’s hear from Rebecca Turner.
(Interview transcript to be added)
And finally let’s talk to Samuel Lim.
(Interview transcript to be added)
As a reminder, RustConf registration is still open and I hope to see you all there. Make sure to listen next week for more interviews with the upcoming speakers.
And that’s all for this week’s podcast, make sure to check out the full issue of This Week in Rust for even more fantastic Rust content.
This Week in Rust is edited by myself, Andre Bogus, and Colton Donnelly. This week’s contributors included, using their GitHub usernames: Categulario, Vishalsodani, Abuckheimer, Hmble, Zethra, and Joshtriplett.
As always, if you write a great article on Rust or happen to see one — please submit it to This Week in Rust by opening a pull request on our GitHub repo. Have a wonderful week everyone and please stay safe out there!