Skip to content
Back to skills

Rust Async

ASecurity

Write async Rust with Tokio correctly: no blocking in async, cancellation-safe selects, bounded channels and structured tasks

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsrustgo

Works with

  • cli

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill rust-async --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Async?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rust Async
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-rust-async/badge)](https://www.skillsdirectory.com/skills/ansh44233-rust-async)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Write async Rust with Tokio correctly: no blocking in async, cancellation-safe selects, bounded channels and structured tasks
profile: full
languages: rust
tags: rust, async, tokio, concurrency
---

# Rust async

Use in Rust code using Tokio or another async runtime.

## Runtime
- Never block in async code: use `tokio::task::spawn_blocking` for CPU or sync I/O.
- Don't hold a `std::sync::Mutex` guard across `.await`; use `tokio::sync::Mutex` only when needed.

## Tasks
- Keep `JoinHandle`s or use `JoinSet`; propagate errors and panics.
- Use bounded `mpsc` channels for backpressure.
- Know which futures are cancellation-safe before using them in `tokio::select!`.

## Timeouts
- `tokio::time::timeout` around network calls; graceful shutdown via a cancellation token.

## Verify
`cargo test` and `cargo clippy -- -D warnings` pass; a test exercises timeout and shutdown paths.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.