asyncs

Crates.ioasyncs
lib.rsasyncs
version0.3.0
sourcesrc
created_at2024-05-10 07:13:20.110121
updated_at2024-05-21 03:56:06.18961
descriptionasync runtime agnostic facilities
homepagehttps://github.com/kezhuw/asyncs
repositoryhttps://github.com/kezhuw/asyncs
max_upload_size
id1235778
size22,205
Kezhu Wang (kezhuw)

documentation

https://docs.rs/asyncs

README

Async runtime agnostic facilities

crates.io github-ci docs.rs Apache-2.0

asyncs is a shim like package to ship async runtime agnostic facilities.

Usages

  • cargo add asyncs for libraries.
  • cargo add --dev --features test asyncs for tests.
  • cargo add --features tokio,smol,async-global-executor for binaries to compat with existing async runtimes. See spawns for more.

Feature test should only be enabled for dev-dependencies.

Provides

  • asyncs::task::spawn to spawn tasks in runtime agnostic way from spawns.
  • select! to multiplex asynchronous futures simultaneously from async-select.
  • #[asyncs::test] to bootstrap a runtime for testing. This is only available with feature test.

Does not provide

Executors and #[asyncs::main].

Commit count: 14

cargo fmt