#facilities #run-time #async

asyncs

async runtime agnostic facilities

4 releases (2 breaking)

0.3.0 May 21, 2024
0.2.1 May 11, 2024
0.2.0 May 10, 2024
0.1.0 May 10, 2024

#2 in #facilities

Download history 6/week @ 2024-07-22 16/week @ 2024-09-16 5/week @ 2024-09-23 2/week @ 2024-10-07 54/week @ 2024-10-14 10/week @ 2024-10-21 24/week @ 2024-11-04

88 downloads per month
Used in 2 crates (via zookeeper-client)

Apache-2.0

66KB
1.5K SLoC

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].

Dependencies

~0.2–9.5MB
~106K SLoC