From the course: Debugging Rust Code with AI
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Async runtime debugging
From the course: Debugging Rust Code with AI
Async runtime debugging
- [Instructor] Hi there, welcome to Async debugging in Rust. Last time we used AI to catch memory bugs like dangling references. Today we are fixing Async runtime issues. Async code can freeze up. It can slow down. Sometime it just crashes. Why does this happen? Async tasks don't run step by step. They use a scheduler. When things break, it usually runtime problems, maybe deadlocks, sometimes race conditions. So how do we fix this? We'll use AI tools. Here's a plan for this video. See how the runtime schedule task, find patterns in how tasks work together, spot race conditions and deadlocks. By the end, you will debug Async Rust with AI on your side. First, let's look at what we need in our cargo.toml. We need Tokio with full features and racing. This powers are Async runtime. We also need console subscriber. This connects to Tokio console for debugging. For comparison, we included Async standard with attributes. This is our alternative runtime. First, let's see why Rust needs an…