#run-time #async #synchronization #utilities #tokio #facilities #asyncs

asyncs-sync

Asynchronous runtime agnostic synchronization utilities

1 unstable release

0.3.0 May 21, 2024

#1761 in Asynchronous

Download history 14/week @ 2024-11-13 17/week @ 2024-11-20 10/week @ 2024-11-27 17/week @ 2024-12-04 67/week @ 2024-12-11 14/week @ 2025-01-15 8/week @ 2025-01-29 7/week @ 2025-02-05 18/week @ 2025-02-19 103/week @ 2025-02-26

130 downloads per month
Used in 3 crates (via asyncs)

Apache-2.0

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

No runtime deps