Registry / async / async-macros

async-macros

JSON →
library2.0.0rscratesunverified

Provides macros for async-std to simplify asynchronous programming.

# Cargo.toml [dependencies] async-macros = "2.0.0"
INSTALL
IMPORT
SIG · ASYNC-MACROS
A
async-macros
asyncrustv2.0.0
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.

join
use async_macros::join;

Uses the join! macro to run two async tasks concurrently.

use async_macros::join; async fn task1() -> u32 { 1 } async fn task2() -> u32 { 2 } #[async_std::main] async fn main() { let (a, b) = join!(task1(), task2()).await; println!("{}, {}", a, b); }
Debug
Known issues
gotchaOnly works with async-std runtime; not compatible with tokio.
fix
Use async-std as the async runtime.
affects: >=1.0.0
Upgrade
Version history
2.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
47 hits · last 30 days
node
38
OpenAI (training)
1
Resources