- Notifications
You must be signed in to change notification settings - Fork341
Async version of the Rust standard library
License
Apache-2.0, MIT licenses found
Licenses found
async-rs/async-std
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
API Docs | Book | Releases | Contributing
This crate provides an async version ofstd
. It provides all the interfacesyou are used to, but in an async version and ready for Rust'sasync
/await
syntax.
- Modern: Built from the ground up for
std::future
andasync/await
withblazing fast compilation time. - Fast: Our robust allocator and threadpool designs provide ultra-highthroughput with predictably low latency.
- Intuitive: Complete parity with the stdlib means you only need to learnAPIs once.
- Clear:Detailed documentation andaccessible guides meanusing async Rust was never easier.
use async_std::task;asyncfnsay_hello(){println!("Hello, world!");}fnmain(){ task::block_on(say_hello())}
More examples, including networking and file access, can be found in ourexamples
directory and in ourdocumentation.
We believe Async Rust should be as easy to pick up as Sync Rust. We also believethat the best API is the one you already know. And finally, we believe thatproviding an asynchronous counterpart to the standard library is the best waystdlib provides a reliable basis for both performance and productivity.
Async-std is the embodiment of that vision. It combines single-allocation taskcreation, with an adaptive lock-free executor, threadpool and network driver tocreate a smooth system that processes work at a high pace with low latency,using Rust's familiar stdlib API.
Withcargo add installed run:
$ cargo add async-std
We also provide a set of "unstable" features with async-std. See thefeaturesdocumentation on how to enable them.
async-tls — Async TLS/SSL streams usingRustls.
async-native-tls —Native TLS for Async. Native TLS for futures and async-std.
async-tungstenite — AsynchronousWebSockets for async-std, tokio, gio and any std Futures runtime.
Tide — Serve the web. A modularweb framework built around async/await.
SQLx — The RustSQL Toolkit. SQLx is a 100% safe Rust library for Postgres and MySQL with compile-time checked queries.
Surf — Surf the web. Surf is a friendlyHTTP client built for casual Rustaceans and veterans alike.
Xactor — Xactor is a rust actors framework based on async-std.
async-graphql — A GraphQL server library implemented in rust, with full support for async/await.
Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in this crate by you, as defined in the Apache-2.0 license, shallbe dual licensed as above, without any additional terms or conditions.
About
Async version of the Rust standard library
Topics
Resources
License
Apache-2.0, MIT licenses found
Licenses found
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.