Async version of the Rust standard library.
Modules in this crate are organized in the same way as in the standard library, except blocking
functions have been replaced with async functions and threads have been replaced with
lightweight tasks.
More information, reading materials, and other resources:
Spawn a task and block the current thread on its result:
use async_std::task;
fn main() {
task::block_on(async {
println!("Hello, world!");
})
}
Unstable APIs in this crate are available when the unstable
Cargo feature is enabled:
[dependencies.async-std]
version = "0.99"
features = ["unstable"]
fs | Filesystem manipulation operations.
|
future | Asynchronous values.
|
io | Basic input and output.
|
net | Networking primitives for TCP/UDP communication.
|
os | OS-specific extensions.
|
pin | Types that pin data to its location in memory.
|
prelude | The async prelude.
|
stream | Asynchronous iteration.
|
sync | Synchronization primitives.
|
task | Asynchronous tasks.
|