Rust crates: async_stream (Twitch live stream 2023-02-20)

Subscribers:
950
Published on ● Video Link: https://www.youtube.com/watch?v=3Iezt-yUxd8



Duration: 1:17:00
105 views
1


In this video, we continued building our lastfm crate and explored how to create async iterators (streams) in tokio using the async_stream crate (https://crates.io/crates/async-stream). I also showcase how to use the Insta crate for snapshot testing (https://crates.io/crates/insta).

- Previous episodes in the series: https://youtu.be/rqUH1Dnz8Ho & https://www.youtube.com/watch?v=mrOYFegU60U

The code is available here: https://github.com/lmammino/rust-lastfm

In this episode I mentioned my article "Where to go to learn Rust": https://loige.co/where-to-go-to-learn-rust-in-2021

Chapters:

00:00:00 Intro & Recap from the last stream & my updates offline
00:10:31 Using Insta for snapshot testing
00:15:00 Looking at building an async client for Last.fm
00:17:20 Fetching pages from the Last.fm API using reqwest
00:31:10 Question: why am I learning Rust?
00:33:00 Creating a test for our client
00:35:12 Question: why Rust and not Golang?
00:38:19 Continuing with the test for our client
00:42:00 Learning how to run a specific test from the CLI :')
00:46:33 Continuing the debugging of our application
00:48:44 Iterating over different pages using the latest timestamp
00:55:30 Implementing our async iterator using async_stream
01:01:30 Using the async iterator we just created
01:09:20 Ideas for the next stream (resilience)
01:12:01 Question: Should I stick to Node.js or learn something else like Rust?
01:14:33 Question: Where should I start learning rust?
01:16:43 Closing

Huge thanks to WGaffa for the help given during this stream :)

To see the next episodes live check out our Twitch channel: https://twitch.tv/loige
Chat with me on Twitter at https://twitter.com/loige

#rust #tokio #async




Other Videos By Luciano Mammino (loige)


2023-07-17Fixing Fullstackbulletin.com part 5 - Twitch Live Stream
2023-07-03Fixing Fullstackbulletin.com part 4 - Twitch Live Stream
2023-06-26Fixing Fullstackbulletin.com part 3 - Twitch Live Stream
2023-06-19Fixing Fullstackbulletin.com part 2 - Twitch Live Stream
2023-06-12Fixing Fullstackbulletin.com part 1 - Twitch Live Stream
2023-05-08Creating Node.js libraries with Rust using Neon (Twitch live stream)
2023-04-18Using Zig from Python 😱 (Twitch Live Stream)
2023-04-03πŸ¦€ Calling Rust from Python 🐍 with PyO3 (Twitch live stream)
2023-03-22πŸ¦€ Exploring Rust crates zip & image (Twitch live stream)
2023-02-27πŸ¦€ Learning Rust web servers with Axum & SQLx (Twitch live stream)
2023-02-21Rust crates: async_stream (Twitch live stream 2023-02-20)
2023-02-13Rust crates: custom serde deserializers (Twitch live stream 2023-02-13)
2023-02-09Rust crates: dotenv, reqwest, url, serde, serde-json (Twitch live stream 2023-02-08)
2023-01-23πŸ¦€ Learning Rust web servers with Axum (Twitch live stream)
2023-01-09πŸ¦€ Learning nom, a Rust parser combinator library (Twitch stream)
2022-11-30Building a Tic Tac Toe game in Solid.js (Twitch Live Stream 2022-11-30)
2022-11-28πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 5 (asteroids)
2022-11-21πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 4 (collisions)
2022-11-14πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 3 (migrating to Bevy 0.9)
2022-11-10πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 2
2022-11-07πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 1



Tags:
rust
json
serde
deserialization
custom deserializers
serde-json
parse JSON data
code
Github
Intro
live streaming
coding
live coding
learning
Rust
programming
software development
JSON
tech tutorials
tech talks
tech education
tech community
computer science
software engineering
web development
data structures
algorithms
problem solving
learning to code
coding for beginners
programming basics
async
stream
async_stream
async-stream
async stream crate