Registry / async / async-main

async-main

JSON →
library0.4.0rscratesunverified

Runtime-agnostic async main proc macro.

# Cargo.toml [dependencies] async_main = "0.4.0"
INSTALL
IMPORT
SIG · ASYNC-MAIN
A
async-main
asyncrustv0.4.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.

async_main
use async_main::async_main;

Define an async main function.

use async_main::async_main; #[async_main] async fn main() { println!("Hello, async world!"); }
Debug
Known issues
gotchaRequires a runtime feature flag (e.g., tokio, async-std) to be enabled.
fix
Add the appropriate feature flag to your Cargo.toml, e.g., async_main = { features = ["tokio"] }.
affects: >=0.4.0
Upgrade
Version history
0.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
53 hits · last 30 days
node
44
Meta
1
OpenAI (training)
1
Resources
async-main — cargo add async-main · libregistry