Registry / async / smol
library2.0.2rscratesunverified

A small and fast async runtime for Rust.

# Cargo.toml [dependencies] smol = "2.0.2"
INSTALL
IMPORT
SIG · SMOL
S
smol
asyncrustv2.0.2
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.

block_on
use smol::block_on;

Runs an async function synchronously using smol's block_on.

use smol::block_on; async fn hello() -> String { "Hello, smol!".to_string() } fn main() { let result = block_on(hello()); println!("{}", result); }
Debug
Known issues
gotchasmol's executor is single-threaded by default; for multi-threaded workloads, use `smol::spawn` with a thread pool or switch to `async-executor`.
fix
Use `smol::spawn` with `smol::block_on` or configure a multi-threaded executor.
affects: >=2.0.0
Upgrade
Version history
2.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources
smol — cargo add smol · libregistry