tokio

Solid

You are an expert in Tokio, the asynchronous runtime for Rust that powers most of the Rust async ecosystem. You help developers build high-performance network applications, concurrent services, and I/O-bound systems using Tokio's task scheduler, async I/O primitives, channels, timers, and synchronization utilities — handling millions of concurrent connections with minimal memory overhead.

Code & Development 62 stars 6 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 88/100

Stars 20%
60
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Tokio — Async Runtime for Rust You are an expert in Tokio, the asynchronous runtime for Rust that powers most of the Rust async ecosystem. You help developers build high-performance network applications, concurrent services, and I/O-bound systems using Tokio's task scheduler, async I/O primitives, channels, timers, and synchronization utilities — handling millions of concurrent connections with minimal memory overhead. ## Core Capabilities ### Async Tasks ```rust use tokio::time::{sleep, Duration}; use tokio::task; #[tokio::main] async fn main() { // Spawn concurrent tasks let handle1 = task::spawn(async { sleep(Duration::from_secs(1)).await; "Task 1 done" }); let handle2 = task::spawn(async { sleep(Duration::from_millis(500)).await; "Task 2 done" }); // Await both let (r1, r2) = tokio::join!(handle1, handle2); println!("{}, {}", r1.unwrap(), r2.unwrap()); // Select first to complete tokio::select! { val = async { sleep(Duration::from_secs(1)).await; "slow" } => { println!("Got: {val}"); } val = async { sleep(Duration::from_millis(100)).await; "fast" } => { println!("Got: {val}"); } } // Spawn blocking work (CPU-intensive) on dedicated thread pool let result = task::spawn_blocking(|| { heavy_computation() // Won't block async runtime }).await.unwrap(); } ``` ### Channels ```rust use tokio::sync::{mp...

Details

Author
TerminalSkills
Repository
TerminalSkills/skills
Created
3 months ago
Last Updated
1 weeks ago
Language
Shell
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

tokio

You are an expert in Tokio, the asynchronous runtime for Rust that powers most of the Rust async ecosystem. You help developers build high-performance network applications, concurrent services, and I/O-bound systems using Tokio's task scheduler, async I/O primitives, channels, timers, and synchronization utilities — handling millions of concurrent connections with minimal memory overhead.

0 Updated 1 months ago
eliferjunior
AI & Automation Solid

rust-async-patterns

Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.

36,222 Updated today
wshobson
AI & Automation Solid

rust-async-patterns

Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.

39,350 Updated today
sickn33
AI & Automation Listed

rust-async-patterns

Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.

335 Updated today
aiskillstore
AI & Automation Listed

mir-backend-rust

Make It Right (Rust runtime tier). Async Rust on Tokio runtime reliability footguns that are shared across EVERY Rust backend framework (Axum, Actix-web, Warp, Poem) — distinct from the generic backend gates and from any one framework's mechanics. Covers: blocking the async runtime (std::thread::sleep / blocking I/O inside async tasks starves Tokio worker threads), holding a std::sync::MutexGuard across an .await point (compile error or deadlock), cancellation safety (futures dropped at any .await under timeout/select!/disconnect leaving partial state), panic-poisoned Mutexes, Arc-based shared state with 'static bounds on spawned tasks, bounded vs unbounded channels for backpressure, and timeout discipline on every outbound call. TRIGGER when the backend runtime is Rust — sits between mir-backend (generic) and the framework module (e.g. mir-backend-rust-axum). SKIP for Python/Node/JVM/Go/.NET/Ruby/PHP/BEAM runtimes (each has its own mir-backend-<runtime> tier), and for framework-library mechanics (those live

12 Updated 6 days ago
anantbhandarkar