Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Async version of the Rust standard library

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

async-rs/async-std

Repository files navigation

Async version of the Rust standard library

CI StatusCrates.io versionDownloaddocs.rs docschat

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/awaitsyntax.

Features

  • Modern: Built from the ground up forstd::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.

Examples

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.

Philosophy

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.

Installation

Run this in your projects folder:

$ cargo add async-std

We also provide a set of "unstable" features with async-std. See thefeaturesdocumentation on how to enable them.

Ecosystem

  • async-tls — Async TLS/SSL streams usingRustls.

  • async-native-tlsNative 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.

License

Licensed under either ofApache License, Version2.0 orMIT license at your option.
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.

[8]ページ先頭

©2009-2025 Movatter.jp