#run-time #async-trait #async #traits #async-await #agnostic

no-std agnostic-lite

agnostic-lite is WASM friendly and light version of agnostic, for users who want to write async runtime-agnostic crate

3 releases

new 0.3.18 Jan 10, 2025
0.3.17 Dec 22, 2024
0.3.16 Oct 6, 2024
0.3.15 Apr 27, 2024
0.1.1 Mar 13, 2024

#1122 in Asynchronous

Download history 86/week @ 2024-09-20 49/week @ 2024-09-27 181/week @ 2024-10-04 75/week @ 2024-10-11 54/week @ 2024-10-18 32/week @ 2024-10-25 162/week @ 2024-11-01 22/week @ 2024-11-08 43/week @ 2024-11-15 60/week @ 2024-11-22 52/week @ 2024-11-29 51/week @ 2024-12-06 36/week @ 2024-12-13 1317/week @ 2024-12-20 294/week @ 2024-12-27 187/week @ 2025-01-03

1,848 downloads per month
Used in 21 crates (10 directly)

MIT/Apache

170KB
4.5K SLoC

Agnostic-Lite

agnostic-lite is WASM friendly and light version of agnostic, for users who want to write async runtime-agnostic crate.

github LoC Build codecov

docs.rs crates.io crates.io license

English | 简体中文

Introduction

agnostic-lite is WASM friendly and light version of agnostic, for users who want to write async runtime-agnostic crate.

agnostic-lite splits the big Runtime trait in agnostic in multiple small traits:

  • AsyncSpawner: trait for spawning tasks
  • AsyncLocalSpawner: trait for spawning local tasks
  • AsyncSleep: trait for sleep functionality
  • AsyncInterval: trait for interval functionality
  • AsyncTimeout: trait for timeout functionality

Builtin supports runtimes:

  • tokio
  • async-std
  • smol
  • wasm-bindgen-futures

Installation

[dependencies]
agnostic-lite = "0.3"

License

agnostic-lite is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2024 Al Liu.

Dependencies

~0.8–13MB
~166K SLoC