Registry / async / tokio
library1.52.3rscratesunverified

An event-driven, non-blocking I/O platform for writing asynchronous I/O backed applications.

# Cargo.toml [dependencies] tokio = "1.52.3"
INSTALL
IMPORT
SIG · TOKIO
T
tokio
asyncrustv1.52.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Runtime
use tokio::runtime::Runtime;

Creates a Tokio runtime and runs an async block.

use tokio::runtime::Runtime; fn main() { let rt = Runtime::new().unwrap(); rt.block_on(async { println!("Hello from Tokio!"); }); }
Debug
Known issues
gotchaTokio requires the `rt` or `rt-multi-thread` feature for the runtime (enabled by default).
fix
Add `tokio = { version = "1", features = ["rt-multi-thread"] }` to Cargo.toml if you disable default features.
affects: >=1.0.0
gotchaUsing `tokio::main` macro requires the `macros` feature (enabled by default).
fix
Ensure `macros` feature is enabled or use `#[tokio::main]` only with default features.
affects: >=1.0.0
Upgrade
Version history
1.52.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
41 hits · last 30 days
node
38
Amazon
1
Resources
tokio — cargo add tokio · libregistry